small correction to last patch to avoid a warning during compile, no Issue
This commit is contained in:
@@ -63,9 +63,9 @@ class SafeKeyFile : public Glib::KeyFile
|
|||||||
|
|
||||||
double get_double(const Glib::ustring& group_name, const Glib::ustring& key) const {
|
double get_double(const Glib::ustring& group_name, const Glib::ustring& key) const {
|
||||||
Glib::ustring temp = get_string( group_name, key);
|
Glib::ustring temp = get_string( group_name, key);
|
||||||
if(temp.data() != "") {
|
if(!temp.empty()) {
|
||||||
double tmpdbl;
|
double tmpdbl;
|
||||||
if(sscanf(temp.data(), "%lf", &tmpdbl))
|
if(sscanf(temp.c_str(), "%lf", &tmpdbl))
|
||||||
return tmpdbl;
|
return tmpdbl;
|
||||||
else
|
else
|
||||||
return 0.0;
|
return 0.0;
|
||||||
@@ -87,9 +87,9 @@ class SafeKeyFile : public Glib::KeyFile
|
|||||||
if(n) {
|
if(n) {
|
||||||
tempdouble.reserve(n);
|
tempdouble.reserve(n);
|
||||||
for (unsigned int i=0; i<n; i++) {
|
for (unsigned int i=0; i<n; i++) {
|
||||||
if(temp[i].data() != "") {
|
if(!temp[i].empty()) {
|
||||||
double tmpdbl;
|
double tmpdbl;
|
||||||
if(sscanf(temp[i].data(), "%lf", &tmpdbl))
|
if(sscanf(temp[i].c_str(), "%lf", &tmpdbl))
|
||||||
tempdouble.push_back(tmpdbl);
|
tempdouble.push_back(tmpdbl);
|
||||||
else
|
else
|
||||||
tempdouble.push_back(0.0);
|
tempdouble.push_back(0.0);
|
||||||
|
Reference in New Issue
Block a user