piodul / zoldak

1 stars 6 forks source link

RFC: use C++11 = {default,deleted} for ctors and dtors where appropriate. #27

Closed szreder closed 9 years ago

szreder commented 9 years ago

This should reduce superfluous fluff in some .cpp files. For example this: src/ZkCommon/Level.h

class LevelLayer
{
public:
    LevelLayer();
    ~LevelLayer();

    ...
};

src/ZkCommon/Level.cpp

LevelLayer::LevelLayer()
{

}

LevelLayer::~LevelLayer()
{

}

could be instead written like this: src/ZkCommon/Level.h

class LevelLayer
{
public:
    LevelLayer() = default;
    ~LevelLayer() = default;

    ...
};

If you're against the idea, feel free to close this issue.

piodul commented 9 years ago

I think this is a good idea.

Tommalla commented 9 years ago

So what's the current scope of the ticket? Hunt down and remove any and all unneeded default ctors/dtors + add info about it to the coding style?

szreder commented 9 years ago

@Tommalla I understand the scope of this ticket in the same way. Working on it.