|
|
@ -7,6 +7,7 @@
|
|
|
|
#include "futils.hpp"
|
|
|
|
#include "futils.hpp"
|
|
|
|
#include "i18n.h" // for _exvGettext
|
|
|
|
#include "i18n.h" // for _exvGettext
|
|
|
|
#include "safe_op.hpp"
|
|
|
|
#include "safe_op.hpp"
|
|
|
|
|
|
|
|
#include "utils.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
// + standard includes
|
|
|
|
// + standard includes
|
|
|
|
#include <array>
|
|
|
|
#include <array>
|
|
|
@ -513,10 +514,9 @@ const char* exvGettext(const char* str) {
|
|
|
|
|
|
|
|
|
|
|
|
template <>
|
|
|
|
template <>
|
|
|
|
bool stringTo<bool>(const std::string& s, bool& ok) {
|
|
|
|
bool stringTo<bool>(const std::string& s, bool& ok) {
|
|
|
|
std::string lcs(s); /* lowercase string */
|
|
|
|
if (s.empty())
|
|
|
|
for (size_t i = 0; i < lcs.length(); i++) {
|
|
|
|
return false;
|
|
|
|
lcs[i] = std::tolower(s[i]);
|
|
|
|
auto lcs = Internal::lower(s); /* lowercase string */
|
|
|
|
}
|
|
|
|
|
|
|
|
/* handle the same values as xmp sdk */
|
|
|
|
/* handle the same values as xmp sdk */
|
|
|
|
if (lcs == "false" || lcs == "f" || lcs == "0") {
|
|
|
|
if (lcs == "false" || lcs == "f" || lcs == "0") {
|
|
|
|
ok = true;
|
|
|
|
ok = true;
|
|
|
|