51
Using Code::Blocks / Re: CB crash today ... but I can continue to use
« Last post by blauzahn on March 12, 2026, 10:27:36 pm »nice work; Thank you!
remarks:
svn13822:
* devcpploader.cpp:43: possibly dereferencing null pointer of non-owning data member m_pProject; An additional guard clause could return early in that case.
* devcpploader.cpp:48 and :156: Shouldn't the (2nd) pointer arg to Read be a nullptr instead of 0?
* devcpploader.cpp:47, 52, 134: uninitialized local variables used as out args to dev->Read:
int unitcount,
int typ,
bool compile,
bool compileCpp,
bool link
We could consider to value initialize them. Read potentially does not assign to them.
* devcpploader.cpp:45: The local variable dev is an owning raw pointer wxFileConfig* without any obvious need. As such, it lacks basic exception safety and could leak. We could consider replacing it with a std::unique_ptr<wxFileConfig> or, even better, just a stack variable wxFileConfig dev.
* devcpploader.h:17: The ctor of DevCppLoader might become explicit.
* devcpploader.h:25: The default ctor might be =deleted instead of defined in private section.
* svn13818: When override is used, we may consider to omit virtual. (see: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#rh-override)
remarks:
svn13822:
* devcpploader.cpp:43: possibly dereferencing null pointer of non-owning data member m_pProject; An additional guard clause could return early in that case.
* devcpploader.cpp:48 and :156: Shouldn't the (2nd) pointer arg to Read be a nullptr instead of 0?
* devcpploader.cpp:47, 52, 134: uninitialized local variables used as out args to dev->Read:
int unitcount,
int typ,
bool compile,
bool compileCpp,
bool link
We could consider to value initialize them. Read potentially does not assign to them.
* devcpploader.cpp:45: The local variable dev is an owning raw pointer wxFileConfig* without any obvious need. As such, it lacks basic exception safety and could leak. We could consider replacing it with a std::unique_ptr<wxFileConfig> or, even better, just a stack variable wxFileConfig dev.
* devcpploader.h:17: The ctor of DevCppLoader might become explicit.
* devcpploader.h:25: The default ctor might be =deleted instead of defined in private section.
* svn13818: When override is used, we may consider to omit virtual. (see: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#rh-override)
Recent Posts