mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
pass by reference
This commit is contained in:
@ -159,13 +159,14 @@ T StringTo(const std::string &t, const std::string &unit) {
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T> T StringTo(std::string t) {
|
||||
auto unit = RemoveUnit(t);
|
||||
return StringTo<T>(t, unit);
|
||||
template <typename T> T StringTo(const std::string& t) {
|
||||
std::string tmp{t};
|
||||
auto unit = RemoveUnit(tmp);
|
||||
return StringTo<T>(tmp, unit);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline slsDetectorDefs::detectorType StringTo(std::string s){
|
||||
inline slsDetectorDefs::detectorType StringTo(const std::string& s){
|
||||
return slsDetectorDefs::detectorTypeToEnum(s);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user