From 674e9bc5760388ae9bddedf9e4e15be86de396df Mon Sep 17 00:00:00 2001 From: Danijel Date: Wed, 13 Nov 2019 17:28:54 +0100 Subject: [PATCH] Fix string retreival in demo and howto --- demo/src/demo.h | 2 +- howto/HOWTO.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/src/demo.h b/demo/src/demo.h index 95dc0a1..8bbb03d 100644 --- a/demo/src/demo.h +++ b/demo/src/demo.h @@ -141,7 +141,7 @@ class Demo Unlime::T_Bytes data; if (ex.get(data, resCategory, resKey)) { - strObject.assign(reinterpret_cast(data.data()), data.size()); + strObject.assign(data.begin(), data.end()); } } diff --git a/howto/HOWTO.md b/howto/HOWTO.md index 2bcf2ff..4eb449b 100644 --- a/howto/HOWTO.md +++ b/howto/HOWTO.md @@ -101,7 +101,7 @@ int main() // Fetch and set the window title Unlime::T_Bytes bytesTitle; if (ex.get(bytesTitle, "window", "title")) { - std::string strTitle = std::string(reinterpret_cast(bytesTitle.data()), bytesTitle.size()); + std::string strTitle(bytesTitle.begin(), bytesTitle.end()); window.setTitle(strTitle); }