File tree Expand file tree Collapse file tree 4 files changed +16
-4
lines changed Expand file tree Collapse file tree 4 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -740,6 +740,11 @@ long String::toInt(void) const
740740
741741float String::toFloat (void ) const
742742{
743- if (buffer) return float (atof (buffer));
744- return 0 ;
743+ return float (toDouble ());
745744}
745+
746+ double String::toDouble (void ) const
747+ {
748+ if (buffer) return atof (buffer);
749+ return 0 ;
750+ }
Original file line number Diff line number Diff line change @@ -190,6 +190,7 @@ class String
190190 // parsing/conversion
191191 long toInt (void ) const ;
192192 float toFloat (void ) const ;
193+ double toDouble (void ) const ;
193194
194195protected:
195196 char *buffer; // the actual char array
Original file line number Diff line number Diff line change @@ -742,6 +742,11 @@ long String::toInt(void) const
742742
743743float String::toFloat (void ) const
744744{
745- if (buffer) return float (atof (buffer));
746- return 0 ;
745+ return float (toDouble ());
747746}
747+
748+ double String::toDouble (void ) const
749+ {
750+ if (buffer) return atof (buffer);
751+ return 0 ;
752+ }
Original file line number Diff line number Diff line change @@ -190,6 +190,7 @@ class String
190190 // parsing/conversion
191191 long toInt (void ) const ;
192192 float toFloat (void ) const ;
193+ double toDouble (void ) const ;
193194
194195protected:
195196 char *buffer; // the actual char array
You can’t perform that action at this time.
0 commit comments