diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-12-13 00:15:17 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-12-13 00:15:17 +0000 |
commit | 65e5e2781ffa5900a5df559faa2690d7e10893e2 (patch) | |
tree | f4bd252eabb7b202a22312ffa7fab1ab7ccbd7b3 /lldb/source/Utility/StructuredData.cpp | |
parent | 96929fdd428aafc9ed3d3a2070627fabb58db1b2 (diff) | |
download | bcm5719-llvm-65e5e2781ffa5900a5df559faa2690d7e10893e2.tar.gz bcm5719-llvm-65e5e2781ffa5900a5df559faa2690d7e10893e2.zip |
[NFC] Small code cleanups in utility.
Fix a few small annoyances in Utility I ran into.
llvm-svn: 348996
Diffstat (limited to 'lldb/source/Utility/StructuredData.cpp')
-rw-r--r-- | lldb/source/Utility/StructuredData.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Utility/StructuredData.cpp b/lldb/source/Utility/StructuredData.cpp index b7f900d52bb..26a96d5972e 100644 --- a/lldb/source/Utility/StructuredData.cpp +++ b/lldb/source/Utility/StructuredData.cpp @@ -144,7 +144,7 @@ static StructuredData::ObjectSP ParseJSONValue(JSONParser &json_parser) { } StructuredData::ObjectSP StructuredData::ParseJSON(std::string json_text) { - JSONParser json_parser(json_text.c_str()); + JSONParser json_parser(json_text); StructuredData::ObjectSP object_sp = ParseJSONValue(json_parser); return object_sp; } @@ -169,11 +169,11 @@ StructuredData::Object::GetObjectForDotSeparatedPath(llvm::StringRef path) { if (this->GetType() == lldb::eStructuredDataTypeArray) { std::pair<llvm::StringRef, llvm::StringRef> match = path.split('['); - if (match.second.size() == 0) { + if (match.second.empty()) { return this->shared_from_this(); } errno = 0; - uint64_t val = strtoul(match.second.str().c_str(), NULL, 10); + uint64_t val = strtoul(match.second.str().c_str(), nullptr, 10); if (errno == 0) { return this->GetAsArray()->GetItemAtIndex(val); } |