Less const-ness

This commit is contained in:
Tristan Penman 2021-11-06 08:44:09 +11:00
parent 3eaf1bb93e
commit 26f3a8476f
4 changed files with 6 additions and 9 deletions

View File

@ -33,9 +33,7 @@ VALIJSON_NORETURN inline void throwLogicError(const std::string& msg) {
#endif
VALIJSON_NORETURN inline void throwNotSupported() {
throwRuntimeError("Not supported"); \
throwRuntimeError("Not supported");
}
} // namespace valijson

View File

@ -2291,7 +2291,7 @@ private:
private:
/// Version of JSON Schema that should be expected when parsing
const Version m_version;
Version m_version;
};
} // namespace valijson

View File

@ -1770,16 +1770,16 @@ private:
}
/// The JSON value being validated
const AdapterType m_target;
AdapterType m_target;
/// Vector of strings describing the current object context
const std::vector<std::string> m_context;
std::vector<std::string> m_context;
/// Optional pointer to a ValidationResults object to be populated
ValidationResults *m_results;
/// Option to use strict type comparison
const bool m_strictTypes;
bool m_strictTypes;
/// Cached regex objects for pattern constraint
std::unordered_map<std::string, std::regex>& m_regexesCache;

View File

@ -67,11 +67,10 @@ public:
private:
/// Flag indicating that strict type comparisons should be used
const bool strictTypes;
bool strictTypes;
/// Cached regex objects for pattern constraint. Key - pattern.
std::unordered_map<std::string, std::regex> regexesCache;
};
} // namespace valijson