X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FSpacing.h;h=4ee1b284c075516ba672fdbc406b947af02f46a5;hb=53b464c5e95ed708e9464db0499826894be450fd;hp=50ecc64daa2849e8e4be4772144913f250d404f3;hpb=75c5c8c9e51469822100d70a1ead0d7f8d3f69de;p=features.git diff --git a/src/Spacing.h b/src/Spacing.h index 50ecc64daa..4ee1b284c0 100644 --- a/src/Spacing.h +++ b/src/Spacing.h @@ -12,9 +12,14 @@ #ifndef SPACING_H #define SPACING_H -#include -#include "support/LOstream.h" +#ifdef HAVE_SSTREAM +#include +using std::istringstream; +#else +#include +#endif +#include "support/LOstream.h" /// class Spacing { @@ -69,7 +74,12 @@ public: void set(Spacing::Space sp, char const * val) { float fval; - sscanf(val, "%f", &fval); +#ifdef HAVE_SSTREAM + istringstream istr(val); +#else + istrstream istr(val); +#endif + istr >> fval; set(sp, fval); } ///