mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
Use PBD::string_to<bool> in legacy ARDOUR::Route methods
This commit is contained in:
parent
9ce1d7c357
commit
04a027a031
1 changed files with 8 additions and 8 deletions
|
|
@ -877,7 +877,7 @@ Route::add_processor_from_xml_2X (const XMLNode& node, int version)
|
||||||
//A2 uses the "active" flag in the toplevel redirect node, not in the child plugin/IO
|
//A2 uses the "active" flag in the toplevel redirect node, not in the child plugin/IO
|
||||||
if (i != children.end()) {
|
if (i != children.end()) {
|
||||||
if ((prop = (*i)->property (X_("active"))) != 0) {
|
if ((prop = (*i)->property (X_("active"))) != 0) {
|
||||||
if ( string_is_affirmative (prop->value()) && (!_session.get_bypass_all_loaded_plugins () || !processor->display_to_user () ) )
|
if ( string_to<bool> (prop->value()) && (!_session.get_bypass_all_loaded_plugins () || !processor->display_to_user () ) )
|
||||||
processor->activate();
|
processor->activate();
|
||||||
else
|
else
|
||||||
processor->deactivate();
|
processor->deactivate();
|
||||||
|
|
@ -2595,13 +2595,13 @@ Route::set_state_2X (const XMLNode& node, int version)
|
||||||
Stripable::set_state (node, version);
|
Stripable::set_state (node, version);
|
||||||
|
|
||||||
if ((prop = node.property (X_("denormal-protection"))) != 0) {
|
if ((prop = node.property (X_("denormal-protection"))) != 0) {
|
||||||
set_denormal_protection (string_is_affirmative (prop->value()));
|
set_denormal_protection (string_to<bool> (prop->value()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((prop = node.property (X_("muted"))) != 0) {
|
if ((prop = node.property (X_("muted"))) != 0) {
|
||||||
|
|
||||||
bool first = true;
|
bool first = true;
|
||||||
bool muted = string_is_affirmative (prop->value());
|
bool muted = string_to<bool> (prop->value());
|
||||||
|
|
||||||
if (muted) {
|
if (muted) {
|
||||||
|
|
||||||
|
|
@ -2609,7 +2609,7 @@ Route::set_state_2X (const XMLNode& node, int version)
|
||||||
|
|
||||||
if ((prop = node.property (X_("mute-affects-pre-fader"))) != 0) {
|
if ((prop = node.property (X_("mute-affects-pre-fader"))) != 0) {
|
||||||
|
|
||||||
if (string_is_affirmative (prop->value())){
|
if (string_to<bool> (prop->value())){
|
||||||
mute_point = mute_point + "PreFader";
|
mute_point = mute_point + "PreFader";
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
|
|
@ -2617,7 +2617,7 @@ Route::set_state_2X (const XMLNode& node, int version)
|
||||||
|
|
||||||
if ((prop = node.property (X_("mute-affects-post-fader"))) != 0) {
|
if ((prop = node.property (X_("mute-affects-post-fader"))) != 0) {
|
||||||
|
|
||||||
if (string_is_affirmative (prop->value())){
|
if (string_to<bool> (prop->value())){
|
||||||
|
|
||||||
if (!first) {
|
if (!first) {
|
||||||
mute_point = mute_point + ",";
|
mute_point = mute_point + ",";
|
||||||
|
|
@ -2630,7 +2630,7 @@ Route::set_state_2X (const XMLNode& node, int version)
|
||||||
|
|
||||||
if ((prop = node.property (X_("mute-affects-control-outs"))) != 0) {
|
if ((prop = node.property (X_("mute-affects-control-outs"))) != 0) {
|
||||||
|
|
||||||
if (string_is_affirmative (prop->value())){
|
if (string_to<bool> (prop->value())){
|
||||||
|
|
||||||
if (!first) {
|
if (!first) {
|
||||||
mute_point = mute_point + ",";
|
mute_point = mute_point + ",";
|
||||||
|
|
@ -2643,7 +2643,7 @@ Route::set_state_2X (const XMLNode& node, int version)
|
||||||
|
|
||||||
if ((prop = node.property (X_("mute-affects-main-outs"))) != 0) {
|
if ((prop = node.property (X_("mute-affects-main-outs"))) != 0) {
|
||||||
|
|
||||||
if (string_is_affirmative (prop->value())){
|
if (string_to<bool> (prop->value())){
|
||||||
|
|
||||||
if (!first) {
|
if (!first) {
|
||||||
mute_point = mute_point + ",";
|
mute_point = mute_point + ",";
|
||||||
|
|
@ -2685,7 +2685,7 @@ Route::set_state_2X (const XMLNode& node, int version)
|
||||||
set_id (*child);
|
set_id (*child);
|
||||||
|
|
||||||
if ((prop = child->property (X_("active"))) != 0) {
|
if ((prop = child->property (X_("active"))) != 0) {
|
||||||
bool yn = string_is_affirmative (prop->value());
|
bool yn = string_to<bool> (prop->value());
|
||||||
_active = !yn; // force switch
|
_active = !yn; // force switch
|
||||||
set_active (yn, this);
|
set_active (yn, this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue