diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2017-04-15 22:02:40 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2017-04-19 09:37:02 +1000 |
commit | 1ce58ad90aab58bca10af9c448b8e186ac532480 (patch) | |
tree | 28aab09ba04cebf9f55110b90867020641808a9d /libs/pbd | |
parent | baa1bff5ec56f3866987b0c0c42f580b7075807e (diff) |
Add additional PBD::string_to/to_string specializations for PBD::ID
Diffstat (limited to 'libs/pbd')
-rw-r--r-- | libs/pbd/pbd/types_convert.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/pbd/pbd/types_convert.h b/libs/pbd/pbd/types_convert.h index 9a1e3c8461..b0cf7c0884 100644 --- a/libs/pbd/pbd/types_convert.h +++ b/libs/pbd/pbd/types_convert.h @@ -43,6 +43,18 @@ inline bool string_to (const std::string& str, ID& val) return true; } +template <> +inline std::string to_string (ID val) +{ + return val.to_s(); +} + +template <> +inline ID string_to (const std::string& str) +{ + return ID(str); +} + } // namespace PBD #endif // PBD_TYPES_CONVERT_H |