diff options
author | Len Ovens <len@ovenwerks.net> | 2016-08-06 09:25:57 -0700 |
---|---|---|
committer | Len Ovens <len@ovenwerks.net> | 2016-08-06 09:25:57 -0700 |
commit | a992ac0b752e837ef6cf14f0bf24ba6b894ef48e (patch) | |
tree | 9dbeec539710a67bdb7d53d40f10c612714a805d | |
parent | 595684ddf77a92895f597d67eb1cec36848722ab (diff) |
OSC: make sure this is c++98 compatible.
-rw-r--r-- | libs/surfaces/osc/osc_select_observer.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libs/surfaces/osc/osc_select_observer.cc b/libs/surfaces/osc/osc_select_observer.cc index 9473897820..657b46ff93 100644 --- a/libs/surfaces/osc/osc_select_observer.cc +++ b/libs/surfaces/osc/osc_select_observer.cc @@ -484,7 +484,7 @@ OSCSelectObserver::gain_message (string path, boost::shared_ptr<Controllable> co if (gainmode) { lo_message_add_float (msg, gain_to_slider_position (controllable->get_value())); - text_message ("/select/name", to_string (accurate_coefficient_to_dB (controllable->get_value()), std::dec)); + text_message ("/select/name", string_compose ("%1%2%3", std::fixed, std::setprecision(2), accurate_coefficient_to_dB (controllable->get_value()))); gain_timeout = 8; } else { if (controllable->get_value() < 1e-15) { @@ -522,7 +522,7 @@ OSCSelectObserver::send_gain (uint32_t id, boost::shared_ptr<PBD::Controllable> #else value = gain_to_slider_position (controllable->get_value()); #endif - text_with_id ("/select/send_name" , id + 1, to_string (db, std::dec)); + text_with_id ("/select/send_name" , id + 1, string_compose ("%1%2%3", std::fixed, std::setprecision(2), db)); if (send_timeout.size() > id) { send_timeout[id] = 8; } @@ -637,9 +637,7 @@ string OSCSelectObserver::set_path (string path, uint32_t id) { if (feedback[2]) { - ostringstream os; - os << path << "/" << id; - path = os.str(); + path = string_compose ("%1/%2", path, id); } return path; } |