summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Utilities/cmjsoncpp/src/lib_json/json_value.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Utilities/cmjsoncpp/src/lib_json/json_value.cpp b/Utilities/cmjsoncpp/src/lib_json/json_value.cpp
index 8f46d3b3f1..478afe102b 100644
--- a/Utilities/cmjsoncpp/src/lib_json/json_value.cpp
+++ b/Utilities/cmjsoncpp/src/lib_json/json_value.cpp
@@ -195,14 +195,18 @@ Value::CZString& Value::CZString::operator=(CZString other) {
}
bool Value::CZString::operator<(const CZString& other) const {
- if (cstr_)
+ if (cstr_) {
+ assert(other.cstr_);
return strcmp(cstr_, other.cstr_) < 0;
+ }
return index_ < other.index_;
}
bool Value::CZString::operator==(const CZString& other) const {
- if (cstr_)
+ if (cstr_) {
+ assert(other.cstr_);
return strcmp(cstr_, other.cstr_) == 0;
+ }
return index_ == other.index_;
}