Skip to content

Commit

Permalink
Minor fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
FranckRJ committed Jun 2, 2024
1 parent 6e04fff commit 8a66729
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/mockutils/DynamicProxy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace fakeit {

DynamicProxy(C &inst) :
_instancePtr(&inst),
_methodMocks(VTUtils::getVTSize<C>()),
_methodMocks(VTUtils::getVTSize<C>(), nullptr),
_offsets(VTUtils::getVTSize<C>(), &funcIdNotStubbed),
_invocationHandlers(_methodMocks, _offsets) {
_originalVt.copyFrom(VirtualTable<C, baseclasses...>::getVTable(*_instancePtr));
Expand Down Expand Up @@ -95,10 +95,10 @@ namespace fakeit {

void Reset() {
_methodMocks = {};
_methodMocks.resize(VTUtils::getVTSize<C>());
_methodMocks.resize(VTUtils::getVTSize<C>(), nullptr);
_members = {};
_offsets = {};
_offsets.resize(VTUtils::getVTSize<C>());
_offsets.resize(VTUtils::getVTSize<C>(), &funcIdNotStubbed);
VirtualTable<C, baseclasses...>::getVTable(*_instancePtr).copyFrom(_originalVt);
}

Expand Down

0 comments on commit 8a66729

Please sign in to comment.