summaryrefslogtreecommitdiff
path: root/libs/pbd
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2015-08-15 14:16:28 +1000
committerTim Mayberry <mojofunk@gmail.com>2017-04-19 09:36:47 +1000
commit3edb6b2e1f3a1e85b9b37378e7c3e261f308ce95 (patch)
treeddc8b7b6ecdefa0801aa30ff7f9d34ce3f6b83f2 /libs/pbd
parent7c4c58ba34115470f8c3147384d7bd0bfc6b3fdb (diff)
Use PBD string conversion functions in PBD::Property class
Diffstat (limited to 'libs/pbd')
-rw-r--r--libs/pbd/pbd/properties.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/libs/pbd/pbd/properties.h b/libs/pbd/pbd/properties.h
index c97b4722ae..a424b718e8 100644
--- a/libs/pbd/pbd/properties.h
+++ b/libs/pbd/pbd/properties.h
@@ -21,10 +21,8 @@
#define __pbd_properties_h__
#include <string>
-#include <sstream>
#include <list>
#include <set>
-#include <iostream>
#include "pbd/libpbd_visibility.h"
#include "pbd/xml++.h"
@@ -32,6 +30,7 @@
#include "pbd/property_list.h"
#include "pbd/enumwriter.h"
#include "pbd/stateful.h"
+#include "pbd/string_convert.h"
namespace PBD {
@@ -265,17 +264,11 @@ private:
* other than C or POSIX locales.
*/
virtual std::string to_string (T const& v) const {
- std::stringstream s;
- s.precision (12); // in case its floating point
- s << v;
- return s.str ();
+ return PBD::to_string (v);
}
virtual T from_string (std::string const& s) const {
- std::stringstream t (s);
- T v;
- t >> v;
- return v;
+ return PBD::string_to<T>(s);
}
};