diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-05-24 00:44:33 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-05-24 00:44:33 +0000 |
commit | 09ad8c8f73dbc64efada18e7ae2f9b64eb1be215 (patch) | |
tree | 58cbfec2928c0ff577927df4c7096d141069da4f /lldb/source/Utility/JSON.cpp | |
parent | 060f4b48d55c761de2722c0b7387966d1e8ede0c (diff) | |
download | bcm5719-llvm-09ad8c8f73dbc64efada18e7ae2f9b64eb1be215.tar.gz bcm5719-llvm-09ad8c8f73dbc64efada18e7ae2f9b64eb1be215.zip |
Fix integer literals which are cast to bool
This change replaces built-in types that are implicitly converted to
booleans.
Differential revision: https://reviews.llvm.org/D62284
llvm-svn: 361580
Diffstat (limited to 'lldb/source/Utility/JSON.cpp')
-rw-r--r-- | lldb/source/Utility/JSON.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Utility/JSON.cpp b/lldb/source/Utility/JSON.cpp index 54b87394505..2c3f6229eda 100644 --- a/lldb/source/Utility/JSON.cpp +++ b/lldb/source/Utility/JSON.cpp @@ -238,7 +238,7 @@ JSONParser::Token JSONParser::GetToken(std::string &value) { break; case '"': { - while (1) { + while (true) { bool was_escaped = false; int escaped_ch = GetEscapedChar(was_escaped); if (escaped_ch == -1) { @@ -453,7 +453,7 @@ JSONValue::SP JSONParser::ParseJSONObject() { std::string value; std::string key; - while (1) { + while (true) { JSONParser::Token token = GetToken(value); if (token == JSONParser::Token::String) { @@ -484,7 +484,7 @@ JSONValue::SP JSONParser::ParseJSONArray() { std::string value; std::string key; - while (1) { + while (true) { JSONValue::SP value_sp = ParseJSONValue(); if (value_sp) array_up->AppendObject(value_sp); |