From 539bf8b726b69d2caf4c5b58f06e5897e08e70d5 Mon Sep 17 00:00:00 2001 From: "U-INFINEON\\jahnst" Date: Sat, 11 Feb 2023 02:21:57 +0100 Subject: [PATCH] Avoid name clash with some GetObject() windows definition --- configuration.cc | 2 +- json.cc | 2 +- json.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configuration.cc b/configuration.cc index 287d66b..ee2488c 100644 --- a/configuration.cc +++ b/configuration.cc @@ -222,7 +222,7 @@ void Configuration::LoadConfig(std::string filename) { posctl.LockMutex(); for (i = 0; i < 2; i++) { - if (jp.GetObject("posctl_axis"+to_string(i), &jaxis)) { + if (jp.GetObjectJson("posctl_axis"+to_string(i), &jaxis)) { jaxis.GetValueDouble("min", &amin); jaxis.GetValueDouble("max", &amax); jaxis.GetValueDouble("kp", &akp); diff --git a/json.cc b/json.cc index 9e55f0a..fad7399 100644 --- a/json.cc +++ b/json.cc @@ -232,7 +232,7 @@ int JSONParse::GetValueInt64(string varname, int64_t *dest) { }; -int JSONParse::GetObject(string varname, JSONParse *dest) { +int JSONParse::GetObjectJson(string varname, JSONParse *dest) { list::iterator iter; if (dest == NULL) return 0; diff --git a/json.h b/json.h index ea351c9..69080fd 100644 --- a/json.h +++ b/json.h @@ -56,7 +56,7 @@ public: int GetValueInt(string varname, int *dest); int GetValueDouble(string varname, double *dest); int GetValueInt64(string varname, int64_t *dest); - int GetObject(string varname, JSONParse *dest); + int GetObjectJson(string varname, JSONParse *dest); int GetIdx(string src, int idx, string *dest); int GetValueIdx(string varname, int idx, string *dest);