Skip to content

Commit 60e2c8a

Browse files
committed
Move m_pExecutableSection to constructor initialize list
1 parent 416f288 commit 60e2c8a

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/module.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,19 @@ using namespace DynLibUtils;
1414
// Input : szModuleName (without extension .dll/.so)
1515
//-----------------------------------------------------------------------------
1616
template<typename Mutex>
17-
CAssemblyModule<Mutex>::CAssemblyModule(const std::string_view szModuleName)
17+
CAssemblyModule<Mutex>::CAssemblyModule(const std::string_view szModuleName) : m_pExecutableSection(nullptr)
1818
{
1919
InitFromName(szModuleName);
20-
m_pExecutableSection = nullptr;
2120
}
2221

2322
//-----------------------------------------------------------------------------
2423
// Purpose: constructor
2524
// Input : pModuleMemory
2625
//-----------------------------------------------------------------------------
2726
template<typename Mutex>
28-
CAssemblyModule<Mutex>::CAssemblyModule(const CMemory& pModuleMemory)
27+
CAssemblyModule<Mutex>::CAssemblyModule(const CMemory& pModuleMemory) : m_pExecutableSection(nullptr)
2928
{
3029
InitFromMemory(pModuleMemory);
31-
m_pExecutableSection = nullptr;
3230
}
3331

3432
template<typename Mutex>

0 commit comments

Comments
 (0)