From 4072430fb317af91820dd67b2738e8fa967b7032 Mon Sep 17 00:00:00 2001 From: Aart Stuurman Date: Wed, 24 Jan 2018 00:19:55 +0100 Subject: [PATCH] Attempt to fix warning C4267 --- include/stringfield.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/stringfield.h b/include/stringfield.h index f9dd7da..85ddef9 100644 --- a/include/stringfield.h +++ b/include/stringfield.h @@ -119,7 +119,7 @@ public: virtual size_t size() const override { // find out size of the size parameter - T size(_data.size()); + T size((T::Type)_data.size()); // size of the uint8 or uint32 + the actual string size return size.size() + _data.size(); @@ -160,7 +160,7 @@ public: virtual void fill(OutBuffer& buffer) const override { // create size - T size(_data.size()); + T size((T::Type)_data.size()); // first, write down the size of the string size.fill(buffer);