Commit 6e7ff34a authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Fix compiler warnings: Use const char* for description (is read-only anyway)

parent 0df112a9
......@@ -249,7 +249,7 @@ void Sensor::setType(int value) {
int Sensor::getType() {
return _type;
}
void Sensor::setDescription(char* value) {
void Sensor::setDescription(const char* value) {
_description = value;
}
void Sensor::setSamples(int value) {
......
......@@ -515,7 +515,7 @@ class Sensor {
void setType(int value);
int getType();
// [4] description of the sensor (default: '')
void setDescription(char *value);
void setDescription(const char *value);
// [5] For some sensors, the measurement can be queried multiple times and an average is returned (default: 1)
void setSamples(int value);
// [6] If more then one sample has to be taken, set the interval in milliseconds between measurements (default: 0)
......@@ -584,7 +584,7 @@ class Sensor {
int _child_id;
int _presentation = S_CUSTOM;
int _type = V_CUSTOM;
char* _description = "";
const char* _description = "";
int _samples = 1;
int _samples_interval = 0;
bool _track_last_value = false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment