Use PBD string conversion functions in PBD::Property class
This commit is contained in:
parent
7c4c58ba34
commit
3edb6b2e1f
|
@ -33,6 +33,7 @@
|
|||
#include "ardour/region_factory.h"
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/smf_source.h"
|
||||
#include "ardour/evoral_types_convert.h"
|
||||
|
||||
#include "gui_thread.h"
|
||||
#include "midi_region_view.h"
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include "evoral/Beats.hpp"
|
||||
#include "evoral/Range.hpp"
|
||||
|
||||
#include "pbd/string_convert.h"
|
||||
|
||||
#include "ardour/ardour.h"
|
||||
#include "ardour/midi_cursor.h"
|
||||
#include "ardour/region.h"
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "ardour/audioengine.h"
|
||||
#include "ardour/butler.h"
|
||||
#include "ardour/debug.h"
|
||||
#include "ardour/evoral_types_convert.h"
|
||||
#include "ardour/io.h"
|
||||
#include "ardour/midi_diskstream.h"
|
||||
#include "ardour/midi_model.h"
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "ardour/source_factory.h"
|
||||
#include "ardour/tempo.h"
|
||||
#include "ardour/types.h"
|
||||
#include "ardour/evoral_types_convert.h"
|
||||
|
||||
#include "pbd/i18n.h"
|
||||
#include <locale.h>
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include "ardour/source.h"
|
||||
#include "ardour/tempo.h"
|
||||
#include "ardour/transient_detector.h"
|
||||
#include "ardour/types_convert.h"
|
||||
|
||||
#include "pbd/i18n.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);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user