Add additional PBD::string_to/to_string specializations for PBD::ID
This commit is contained in:
parent
baa1bff5ec
commit
1ce58ad90a
@ -43,6 +43,18 @@ inline bool string_to (const std::string& str, ID& val)
|
|||||||
return true;
|
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
|
} // namespace PBD
|
||||||
|
|
||||||
#endif // PBD_TYPES_CONVERT_H
|
#endif // PBD_TYPES_CONVERT_H
|
||||||
|
Loading…
Reference in New Issue
Block a user