diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 9f9e88498f..351d2d3d39 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -2529,8 +2529,8 @@ XMLNode& Route::state (bool save_template) const { if (!_session._template_state_dir.empty()) { -#warning CONSTIFICATION fix this - // const_cast(this)->foreach_processor (sigc::bind (sigc::mem_fun (*this, &Route::set_plugin_state_dir), _session._template_state_dir)); + Route* ncthis = const_cast (this); + foreach_processor (sigc::bind (sigc::mem_fun (*ncthis, &Route::set_plugin_state_dir), _session._template_state_dir)); } XMLNode *node = new XMLNode("Route");