double ret = wcstod(str.GetPointer(), &pEnd);
SysTryReturn(NID_BASE, !(ret == 0 && errno == EINVAL) && (pEnd[0] == 0), std::numeric_limits< double >::quiet_NaN(),
E_NUM_FORMAT, "[%s] wcstod() failed. Scan stopped at (%ls)", GetErrorMessage(E_NUM_FORMAT), pEnd);
- SysTryReturn(NID_BASE, errno == 0 && ret != HUGE_VAL && ret != -HUGE_VAL, std::numeric_limits< double >::quiet_NaN(),
+ SysTryReturn(NID_BASE, errno == 0 || (ret != HUGE_VAL && ret != -HUGE_VAL), std::numeric_limits< double >::quiet_NaN(),
E_NUM_FORMAT, "[%s] Parsed value cannot fit into a Double.", GetErrorMessage(E_NUM_FORMAT));
return ret;
float ret = wcstof(str.GetPointer(), &pEnd);
SysTryReturn(NID_BASE, !(ret == 0 && errno == EINVAL) && pEnd[0] == 0, std::numeric_limits< float >::quiet_NaN(),
E_NUM_FORMAT, "[%s] wcstof() failed. Scan stopped at (%ls).", GetErrorMessage(E_NUM_FORMAT), pEnd);
- SysTryReturn(NID_BASE, errno == 0 && ret != HUGE_VAL && ret != -HUGE_VAL, std::numeric_limits< float >::quiet_NaN(),
+ SysTryReturn(NID_BASE, errno == 0 || (ret != HUGE_VAL && ret != -HUGE_VAL), std::numeric_limits< float >::quiet_NaN(),
E_NUM_FORMAT, "[%s] Parsed value cannot fit into a Float.", GetErrorMessage(E_NUM_FORMAT));
return ret;