diff --git a/modules/swagger-codegen/src/main/resources/cpprest/apiclient-source.mustache b/modules/swagger-codegen/src/main/resources/cpprest/apiclient-source.mustache index 54112543316..a13771f4311 100644 --- a/modules/swagger-codegen/src/main/resources/cpprest/apiclient-source.mustache +++ b/modules/swagger-codegen/src/main/resources/cpprest/apiclient-source.mustache @@ -33,11 +33,11 @@ utility::string_t ApiClient::parameterToString(utility::string_t value) } utility::string_t ApiClient::parameterToString(int64_t value) { - return std::to_wstring(value); + return utility::conversions::to_string_t(std::to_string(value)); } utility::string_t ApiClient::parameterToString(int32_t value) { - return std::to_wstring(value); + return utility::conversions::to_string_t(std::to_string(value)); } pplx::task ApiClient::callApi( diff --git a/modules/swagger-codegen/src/main/resources/cpprest/modelbase-source.mustache b/modules/swagger-codegen/src/main/resources/cpprest/modelbase-source.mustache index 4d9ee6b40a0..787e390d0fd 100644 --- a/modules/swagger-codegen/src/main/resources/cpprest/modelbase-source.mustache +++ b/modules/swagger-codegen/src/main/resources/cpprest/modelbase-source.mustache @@ -306,7 +306,7 @@ utility::string_t ModelBase::stringFromHttpContent(std::shared_ptr std::string str((std::istreambuf_iterator(*data.get())), std::istreambuf_iterator()); - return utility::conversions::to_utf16string(str); + return utility::conversions::to_string_t(str); } utility::datetime ModelBase::dateFromHttpContent(std::shared_ptr val) { diff --git a/samples/client/petstore/cpprest/ApiClient.cpp b/samples/client/petstore/cpprest/ApiClient.cpp index 59cc503734c..0fb3bc20301 100644 --- a/samples/client/petstore/cpprest/ApiClient.cpp +++ b/samples/client/petstore/cpprest/ApiClient.cpp @@ -57,11 +57,11 @@ utility::string_t ApiClient::parameterToString(utility::string_t value) } utility::string_t ApiClient::parameterToString(int64_t value) { - return std::to_wstring(value); + return utility::conversions::to_string_t(std::to_string(value)); } utility::string_t ApiClient::parameterToString(int32_t value) { - return std::to_wstring(value); + return utility::conversions::to_string_t(std::to_string(value)); } pplx::task ApiClient::callApi( diff --git a/samples/client/petstore/cpprest/ModelBase.cpp b/samples/client/petstore/cpprest/ModelBase.cpp index 74e46b31faf..566d82657bf 100644 --- a/samples/client/petstore/cpprest/ModelBase.cpp +++ b/samples/client/petstore/cpprest/ModelBase.cpp @@ -330,7 +330,7 @@ utility::string_t ModelBase::stringFromHttpContent(std::shared_ptr std::string str((std::istreambuf_iterator(*data.get())), std::istreambuf_iterator()); - return utility::conversions::to_utf16string(str); + return utility::conversions::to_string_t(str); } utility::datetime ModelBase::dateFromHttpContent(std::shared_ptr val) {