projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
baa1bff
)
Add additional PBD::string_to/to_string specializations for PBD::ID
author
Tim Mayberry
<mojofunk@gmail.com>
Sat, 15 Apr 2017 12:02:40 +0000
(22:02 +1000)
committer
Tim Mayberry
<mojofunk@gmail.com>
Tue, 18 Apr 2017 23:37:02 +0000
(09:37 +1000)
libs/pbd/pbd/types_convert.h
patch
|
blob
|
history
diff --git
a/libs/pbd/pbd/types_convert.h
b/libs/pbd/pbd/types_convert.h
index 9a1e3c8461796b69a94f5bbee209c3c4f23bc295..b0cf7c0884a4368fa6b910929e8bc3dc602bc8b9 100644
(file)
--- 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