From 4c55151e9dbf8f5c5aab3b62a5ad749ed2789561 Mon Sep 17 00:00:00 2001 From: lganzzzo Date: Tue, 26 Oct 2021 00:28:17 +0300 Subject: [PATCH] update to the latest oatpp API version. --- src/db/Database.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/db/Database.cpp b/src/db/Database.cpp index 0b9ef95..1bd48fa 100644 --- a/src/db/Database.cpp +++ b/src/db/Database.cpp @@ -1,7 +1,6 @@ #include "Database.hpp" #include "oatpp/core/parser/Caret.hpp" -#include "oatpp/core/base/StrBuffer.hpp" HueDevice Database::updateFromStateDto(v_int32 id, const oatpp::Object &hueDeviceStateDto) { std::lock_guard lock(m_lock); @@ -65,7 +64,7 @@ HueDevice Database::serializeFromDto(const oatpp::Object& hueDevic } if(hueDeviceDto->uniqueid){ oatpp::parser::Caret caret(hueDeviceDto->uniqueid); - caret.setPosition(hueDeviceDto->uniqueid->getSize() - 4); + caret.setPosition(hueDeviceDto->uniqueid->size() - 4); v_int32 id = caret.parseInt(); if (caret.hasError()) throw std::runtime_error("Malformed uniqueid: Unable to parse id integer"); @@ -76,7 +75,7 @@ HueDevice Database::serializeFromDto(const oatpp::Object& hueDevic oatpp::Object Database::deserializeToDto(const HueDevice& hueDevice){ auto dto = HueDeviceDto::createShared(); - size_t namehash = std::hash{}(hueDevice.name->std_str()); + size_t namehash = std::hash{}(*hueDevice.name); char idstr[32] = {0}; if (sizeof(size_t) == 8) { // Mod with the largest prime under 2^32 to map the 64bit hash to 32bit