Skip to content

Commit 258f837

Browse files
committed
--clang-tidy suggestions
1 parent 2b34d67 commit 258f837

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/esp/core/Configuration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ class Configuration {
283283

284284
int getNumEntries() const { return numEntries; }
285285

286-
bool hasValues() { return numEntries > 0; }
286+
bool hasValues() const { return numEntries > 0; }
287287

288288
bool hasValue(const std::string& key) const {
289289
return (configMap_.count(key) > 0) || (intMap_.count(key) > 0) ||

src/esp/io/json.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ bool writeJsonToFile(const JsonDocument& document,
5757
return writeSuccess;
5858
}
5959

60-
int loadJsonIntoConfiguration(const JsonGenericValue& jsonObj,
61-
std::shared_ptr<core::Configuration> config) {
60+
int loadJsonIntoConfiguration(
61+
const JsonGenericValue& jsonObj,
62+
const std::shared_ptr<core::Configuration>& config) {
6263
// count number of valid user config settings found
6364

6465
int numConfigSettings = 0;

src/esp/io/json.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ esp::vec3f jsonToVec3f(const JsonGenericValue& jsonArray);
6464
*/
6565
int loadJsonIntoConfiguration(
6666
const JsonGenericValue& jsonObj,
67-
std::shared_ptr<esp::core::Configuration> configPtr);
67+
const std::shared_ptr<esp::core::Configuration>& configPtr);
6868

6969
/**
7070
* @brief Check passed json doc for existence of passed jsonTag as value of

0 commit comments

Comments
 (0)