From 6438b954124dbba2bc3e017e466667498a60883b Mon Sep 17 00:00:00 2001 From: FranckRJ Date: Sun, 12 May 2024 19:01:57 +0200 Subject: [PATCH] Minor reverts. --- include/mockutils/VTUtils.hpp | 2 +- include/mockutils/mscpp/VirtualTable.hpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/mockutils/VTUtils.hpp b/include/mockutils/VTUtils.hpp index cc0268e1..3256b711 100644 --- a/include/mockutils/VTUtils.hpp +++ b/include/mockutils/VTUtils.hpp @@ -65,7 +65,7 @@ namespace fakeit { } template - static size_t getVTSize() { + static unsigned int getVTSize() { struct Derrived : public C { virtual void endOfVt() { } diff --git a/include/mockutils/mscpp/VirtualTable.hpp b/include/mockutils/mscpp/VirtualTable.hpp index 449f6577..ccaca7f7 100644 --- a/include/mockutils/mscpp/VirtualTable.hpp +++ b/include/mockutils/mscpp/VirtualTable.hpp @@ -178,7 +178,7 @@ namespace fakeit { } void copyFrom(VirtualTable &from) { - auto size = VTUtils::getVTSize(); + unsigned int size = VTUtils::getVTSize(); for (unsigned int i = 0; i < size; i++) { _firstMethod[i] = from.getMethod(i); } @@ -234,7 +234,7 @@ namespace fakeit { setCookie(dtorCookieIndex, method); } - size_t getSize() { + unsigned int getSize() { return VTUtils::getVTSize(); } @@ -256,7 +256,7 @@ namespace fakeit { static const unsigned int dtorCookieIndex = numOfCookies - 1; // use the last cookie static void **buildVTArray() { - auto vtSize = VTUtils::getVTSize(); + unsigned int vtSize = VTUtils::getVTSize(); auto array = new void *[vtSize + numOfCookies + 1]{}; RTTICompleteObjectLocator *objectLocator = new RTTICompleteObjectLocator( typeid(C));