// I really mean assignment ("=") below, not equality!
if ((i = data.find_last_of("0123456789.")) != string::npos) {
if (number_index > 3) return 'E'; // Error
- string buffer = data.substr(0, i + 1);
- if (sscanf (buffer.c_str(),
- "%f", &number[number_index]) == 1) {
+ string buffer = data.substr(0, i + 1).c_str();
+ double x = strToDbl(buffer);
+ if (x) {
+ number[number_index] = x;
lyx_advance (data, i + 1);
++number_index;
return 'n';
}
-bool LyXLength::operator== (LyXLength const & other) const
-{
- return (val == other.val &&
- uni == other.uni);
-}
-
-
string LyXLength::asString() const
{
#ifdef HAVE_SSTREAM
}
-bool LyXGlueLength::operator== (LyXGlueLength const & other) const
-{
- return (val == other.val &&
- uni == other.uni &&
- plus_val == other.plus_val &&
- plus_uni == other.plus_uni &&
- minus_val == other.minus_val &&
- minus_uni == other.minus_uni);
-}
-
-
string LyXGlueLength::asString() const
{
#ifdef HAVE_SSTREAM