diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-01-02 17:36:38 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-01-02 17:36:38 +0000 |
commit | 8fabcf4f760e68e10573efc0ef1da9d6d8453885 (patch) | |
tree | e7362b6dbb266b639c5e4855bd9eadf522d58911 /libs/ardour/route.cc | |
parent | b529cbc5dc0b92f01ff01d5f40786ff025fbb63b (diff) |
finish use of EnumWriter for saving flags etc. throughout the session file
git-svn-id: svn://localhost/ardour2/trunk@1259 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r-- | libs/ardour/route.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 38cd7ad37d..f32757c169 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -24,6 +24,7 @@ #include <sigc++/bind.h> #include <pbd/xml++.h> +#include <pbd/enumwriter.h> #include <ardour/timestamps.h> #include <ardour/buffer.h> @@ -1372,8 +1373,7 @@ Route::state(bool full_state) char buf[32]; if (_flags) { - snprintf (buf, sizeof (buf), "0x%x", _flags); - node->add_property("flags", buf); + node->add_property("flags", enum_2_string (_flags)); } node->add_property("default-type", _default_type.to_string()); @@ -1533,9 +1533,7 @@ Route::_set_state (const XMLNode& node, bool call_base) } if ((prop = node.property (X_("flags"))) != 0) { - int x; - sscanf (prop->value().c_str(), "0x%x", &x); - _flags = Flag (x); + _flags = Flag (string_2_enum (prop->value(), _flags)); } else { _flags = Flag (0); } |