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));