mirror of
https://github.com/polybar/polybar.git
synced 2024-11-18 13:55:11 -05:00
fix(config): Test type and not value
This commit is contained in:
parent
94ded75756
commit
3c0cc72c55
1 changed files with 4 additions and 3 deletions
|
@ -212,12 +212,13 @@ class config {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path.find("xrdb:") == 0) {
|
if (path.find("xrdb:") == 0) {
|
||||||
if (std::is_same<string, T>())
|
if (std::is_same<string, T>::value)
|
||||||
return boost::lexical_cast<T>(m_xrm.get_string(path.substr(5)));
|
return boost::lexical_cast<T>(m_xrm.get_string(path.substr(5)));
|
||||||
else if (std::is_same<float, T>())
|
else if (std::is_same<float, T>::value)
|
||||||
return boost::lexical_cast<T>(m_xrm.get_float(path.substr(5)));
|
return boost::lexical_cast<T>(m_xrm.get_float(path.substr(5)));
|
||||||
else if (std::is_same<int, T>())
|
else if (std::is_same<int, T>::value)
|
||||||
return boost::lexical_cast<T>(m_xrm.get_int(path.substr(5)));
|
return boost::lexical_cast<T>(m_xrm.get_int(path.substr(5)));
|
||||||
|
return ref_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto ref_path = build_path(ref_section, ref_key);
|
auto ref_path = build_path(ref_section, ref_key);
|
||||||
|
|
Loading…
Reference in a new issue