diff --git a/src/oatpp/data/resource/TemporaryFile.cpp b/src/oatpp/data/resource/TemporaryFile.cpp index cece6df3..174f6532 100644 --- a/src/oatpp/data/resource/TemporaryFile.cpp +++ b/src/oatpp/data/resource/TemporaryFile.cpp @@ -42,7 +42,7 @@ TemporaryFile::FileHandle::~FileHandle() { oatpp::String TemporaryFile::constructRandomFilename(const oatpp::String &dir, v_int32 randomWordSizeBytes, const oatpp::String &extension) { std::unique_ptr buff(new v_char8[static_cast(randomWordSizeBytes)]); - utils::random::Random::randomBytes(buff.get(), randomWordSizeBytes); + utils::Random::randomBytes(buff.get(), randomWordSizeBytes); data::stream::BufferOutputStream s(randomWordSizeBytes * 2 + 4); encoding::Hex::encode(&s, buff.get(), randomWordSizeBytes, encoding::Hex::ALPHABET_LOWER); if (extension->at(0) != '.') { diff --git a/src/oatpp/json/Serializer.cpp b/src/oatpp/json/Serializer.cpp index 569ad715..a08f40cc 100644 --- a/src/oatpp/json/Serializer.cpp +++ b/src/oatpp/json/Serializer.cpp @@ -151,7 +151,7 @@ void Serializer::serializePairs(State& state) { if(!nestedState.errorStack.empty()) { state.errorStack.splice(nestedState.errorStack); - state.errorStack.push("[oatpp::json::Serializer::serializeMap()]: key='" + pair.first + "'"); + state.errorStack.push("[oatpp::json::Serializer::serializePairs()]: key='" + pair.first + "'"); return; } } diff --git a/src/oatpp/utils/Random.cpp b/src/oatpp/utils/Random.cpp index 2d3dd471..63c00512 100644 --- a/src/oatpp/utils/Random.cpp +++ b/src/oatpp/utils/Random.cpp @@ -24,7 +24,7 @@ #include "Random.hpp" -namespace oatpp { namespace utils { namespace random { +namespace oatpp { namespace utils { #ifndef OATPP_COMPAT_BUILD_NO_THREAD_LOCAL thread_local std::mt19937 Random::RANDOM_GENERATOR(std::random_device{}()); @@ -47,4 +47,4 @@ void Random::randomBytes(p_char8 buffer, v_buff_size bufferSize) { } -}}} +}} diff --git a/src/oatpp/utils/Random.hpp b/src/oatpp/utils/Random.hpp index 35f46f8f..4e52a5aa 100644 --- a/src/oatpp/utils/Random.hpp +++ b/src/oatpp/utils/Random.hpp @@ -29,7 +29,7 @@ #include "oatpp/Types.hpp" #include -namespace oatpp { namespace utils { namespace random { +namespace oatpp { namespace utils { /** * Utility class for random values. @@ -53,6 +53,6 @@ public: }; -}}} +}} #endif // oatpp_utils_Random_hpp diff --git a/src/oatpp/web/mime/multipart/Multipart.cpp b/src/oatpp/web/mime/multipart/Multipart.cpp index 44aea45b..2d3f5379 100644 --- a/src/oatpp/web/mime/multipart/Multipart.cpp +++ b/src/oatpp/web/mime/multipart/Multipart.cpp @@ -59,7 +59,7 @@ void Multipart::writeNextPartSimple(const std::shared_ptr& part) { oatpp::String Multipart::generateRandomBoundary(v_int32 boundarySize) { std::unique_ptr buffer(new v_char8[static_cast(boundarySize)]); - utils::random::Random::randomBytes(buffer.get(), boundarySize); + utils::Random::randomBytes(buffer.get(), boundarySize); return encoding::Base64::encode(buffer.get(), boundarySize, encoding::Base64::ALPHABET_BASE64_URL_SAFE); } diff --git a/test/oatpp/encoding/UrlTest.cpp b/test/oatpp/encoding/UrlTest.cpp index 1088f0d1..943280eb 100644 --- a/test/oatpp/encoding/UrlTest.cpp +++ b/test/oatpp/encoding/UrlTest.cpp @@ -38,7 +38,7 @@ void UrlTest::onRun(){ for(v_int32 i = 0; i < 100; i++) { oatpp::String buff(100); - utils::random::Random::randomBytes(reinterpret_cast(buff->data()), static_cast(buff->size())); + utils::Random::randomBytes(reinterpret_cast(buff->data()), static_cast(buff->size())); auto encoded = oatpp::encoding::Url::encode(buff, config); auto decoded = oatpp::encoding::Url::decode(encoded); OATPP_ASSERT(decoded == buff) @@ -51,7 +51,7 @@ void UrlTest::onRun(){ for(v_int32 i = 0; i < 100; i++) { oatpp::String buff(100); - utils::random::Random::randomBytes(reinterpret_cast(buff->data()), static_cast(buff->size())); + utils::Random::randomBytes(reinterpret_cast(buff->data()), static_cast(buff->size())); auto encoded = oatpp::encoding::Url::encode(buff, config); auto decoded = oatpp::encoding::Url::decode(encoded); OATPP_ASSERT(decoded == buff)