]> git.lyx.org Git - lyx.git/blobdiff - src/Spacing.C
fix build, thesaurus
[lyx.git] / src / Spacing.C
index 61cf42bbcecc320dcab1feeaa958a914f2dfeaa0..30dd365a8f9696bff178414e6aea46d11375e96b 100644 (file)
 using std::ios;
 using std::ostream;
 
-/// how can I put this inside of Spacing (class)
-namespace {
-
-char const * const spacing_string[] = {"single", "onehalf", "double", "other"};
-
-} // namespace anon
-
-
+string const Spacing::spacing_string[]
+       = {"single", "onehalf", "double", "other"};
 float Spacing::getValue() const 
 {
        switch (space) {
@@ -58,8 +53,8 @@ void Spacing::set(Spacing::Space sp, float val)
 
 void Spacing::set(Spacing::Space sp, string const & val)
 {
-       float fval;
-       istringstream istr(val);
+       float fval = 0.0;
+       istringstream istr(val.c_str());
        istr >> fval;
        set(sp, fval);
 }