blob: 6aa3f549da0bf3509e98e61469dc7224eec328dc [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From bfba6445a778007f40af5cbfbe725e12c0fcafc6 Mon Sep 17 00:00:00 2001
2From: Tomas Volf <~@wolfsden.cz>
3Date: Tue, 5 Mar 2024 22:25:20 +0100
4Subject: [PATCH] gm_utils.cpp: Call clear instead of empty.
5
6Since the intention seem to be to erase the next word, I believe calling empty
7was a mistake and it should have been clear. Empty does nothing in this
8context.
9
10* src/gm_utils.cpp (wrap_cstr): Call clear.
11---
12 src/gm_utils.cpp | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15--- a/src/gm_utils.cpp
16+++ b/src/gm_utils.cpp
17@@ -311,7 +311,7 @@ void wrap_cstr(string& wrapped, unsigned
18 // trim leading spaces
19 std::size_t pos = next_word.find_first_not_of(' ');
20 if( pos == std::string::npos )
21- next_word.empty();
22+ next_word.clear();
23 else if( pos )
24 next_word.erase( 0, pos );
25