mirror of
https://github.com/gflags/gflags.git
synced 2025-04-04 21:15:05 +00:00
Reverted change and introduced another change
Reverted the change that changed the type of variable chars_left to size_t and instead casted the chars_left variable to size_t in the assertion causing a warning in gflags_reporting.cc
This commit is contained in:
parent
3b185f2882
commit
e66e30256f
1 changed files with 3 additions and 2 deletions
|
@ -122,11 +122,12 @@ string DescribeOneFlag(const CommandLineFlagInfo& flag) {
|
|||
flag.name.c_str(),
|
||||
flag.description.c_str());
|
||||
const char* c_string = main_part.c_str();
|
||||
size_t chars_left = main_part.length();
|
||||
int chars_left = main_part.length();
|
||||
string final_string = "";
|
||||
int chars_in_line = 0; // how many chars in current line so far?
|
||||
while (1) {
|
||||
assert(chars_left == strlen(c_string)); // Unless there's a \0 in there?
|
||||
assert(static_cast<size_t>(chars_left)
|
||||
== strlen(c_string)); // Unless there's a \0 in there?
|
||||
const char* newline = strchr(c_string, '\n');
|
||||
if (newline == NULL && chars_in_line+chars_left < kLineLength) {
|
||||
// The whole remainder of the string fits on this line
|
||||
|
|
Loading…
Add table
Reference in a new issue