Skip to content

Commit 2862023

Browse files
committed
Explicit implementation of template method
- CI build broke with: /__w/OpenBikeSensorFirmware/OpenBikeSensorFirmware/bin/src/configServer.cpp:1159: undefined reference to `bool ObsConfig::setProperty<int>(int, String const&, int const&)'
1 parent 7d7f30f commit 2862023

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/config.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,12 @@ bool ObsConfig::setProperty(int profile, String const &key, T const &value) {
207207
return true; // value == oldValue;
208208
}
209209

210+
bool ObsConfig::setProperty(int profile, String const &key, int const &value) {
211+
auto oldValue = jsonData["obs"][profile][key];
212+
jsonData["obs"][profile][key] = value;
213+
return value == oldValue;
214+
}
215+
210216
bool ObsConfig::setProperty(int profile, String const &key, String const &value) {
211217
auto oldValue = jsonData["obs"][profile][key];
212218
jsonData["obs"][profile][key] = value;

src/config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ class ObsConfig {
100100

101101
bool setProperty(int profile, const String &key, std::string const &value);
102102
bool setProperty(int profile, const String &key, String const &value);
103+
bool setProperty(int profile, const String &key, int const &value);
103104
template<typename T> bool setProperty(int profile, const String &key, T const &value);
104105
bool setOffsets(int profile, std::vector<int> const &value);
105106

0 commit comments

Comments
 (0)