Skip to content

Commit 2c95d10

Browse files
authored
Fix compilation error on Linux systems
L"NULL" is a wchar in which fails to compile if the cpprestsdk::string_t is defined as std::string and not std::wstring (It's std::wstring only for windows)
1 parent 2ac46ed commit 2c95d10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

samples/client/petstore/cpp-restsdk/client/ModelBase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ utility::string_t ModelBase::stringFromJson(const web::json::value& val)
296296

297297
utility::datetime ModelBase::dateFromJson(const web::json::value& val)
298298
{
299-
return val.is_null() ? utility::datetime::from_string(L"NULL", utility::datetime::ISO_8601) : utility::datetime::from_string(val.as_string(), utility::datetime::ISO_8601);
299+
return val.is_null() ? utility::datetime::from_string(utility::conversions::to_string_t("NULL"), utility::datetime::ISO_8601) : utility::datetime::from_string(val.as_string(), utility::datetime::ISO_8601);
300300
}
301301
bool ModelBase::boolFromJson(const web::json::value& val)
302302
{

0 commit comments

Comments
 (0)