Base: C++ core guidelines: init variables

This commit is contained in:
wmayer
2023-08-24 14:21:05 +02:00
committed by wwmayer
parent 1ed3782d4b
commit 097d5d6fee
43 changed files with 622 additions and 626 deletions

View File

@@ -117,7 +117,7 @@ inline void Assert(int expr, char *msg) // C++ assert
inline PyObject* getTypeAsObject(PyTypeObject* type) {
// See https://en.cppreference.com/w/cpp/string/byte/memcpy
// and https://en.cppreference.com/w/cpp/language/reinterpret_cast
PyObject* obj;
PyObject* obj{};
std::memcpy(&obj, &type, sizeof type);
return obj;
}
@@ -184,7 +184,7 @@ namespace Base
* @see Py_Try
* @see Py_Assert
*/
class BaseExport PyObjectBase : public PyObject
class BaseExport PyObjectBase : public PyObject //NOLINT
{
/** Py_Header struct from python.h.
* Every PyObjectBase object is also a python object. So you can use
@@ -337,12 +337,12 @@ private:
void clearAttributes();
protected:
std::bitset<32> StatusBits;
std::bitset<32> StatusBits; //NOLINT
/// pointer to the handled class
void * _pcTwinPointer;
void * _pcTwinPointer; //NOLINT
public:
PyObject* baseProxy{nullptr};
PyObject* baseProxy{nullptr}; //NOLINT
private:
PyObject* attrDict{nullptr};