Skip to content

Conversation

@sbx320
Copy link
Member

@sbx320 sbx320 commented Jun 9, 2019

Requires testing. I don't have a client available right now, so I can't test that part.

@ccw808 ccw808 self-requested a review June 9, 2019 15:09
@ccw808
Copy link
Member

ccw808 commented Jun 9, 2019

No

@patrikjuvonen patrikjuvonen added the enhancement New feature or request label Jun 9, 2019
@qaisjp
Copy link
Contributor

qaisjp commented Jun 10, 2019

Next error:

In file included from ../Server/mods/deathmatch/StdInc.h:59:
In file included from ../Server/mods/deathmatch/logic/packets/CEntityAddPacket.h:18:
../Server/mods/deathmatch/logic/packets/../CGame.h:531:54: error: no viable conversion from 'nullptr_t' to 'CCommandLineParser'
    CCommandLineParser         m_CommandLineParser = nullptr;
                                                     ^~~~~~~

@Dutchman101
Copy link
Member

There are multiple occurences of ZERO_ON_NEW in PR #760.
If this goes through, then we should ensure that no pending PR's will re-introduce the macro's usage.

bool m_bDoPaintballs;
bool m_bShowInterpolation;
bool m_bDoPaintballs = 0;
bool m_bShowInterpolation = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool m_bShowInterpolation = 0;
bool m_bShowInterpolation = false;

bool m_bShowSound;
bool m_bDevelopmentMode = 0;
bool m_bShowCollision = 0;
bool m_bShowSound = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool m_bShowSound = 0;
bool m_bShowSound = false;

bool m_bShowCollision;
bool m_bShowSound;
bool m_bDevelopmentMode = 0;
bool m_bShowCollision = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool m_bShowCollision = 0;
bool m_bShowCollision = false;

bool m_bDevelopmentMode;
bool m_bShowCollision;
bool m_bShowSound;
bool m_bDevelopmentMode = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool m_bDevelopmentMode = 0;
bool m_bDevelopmentMode = false;

CVector m_vecLastMimicRot;
bool m_bDoPaintballs;
bool m_bShowInterpolation;
bool m_bDoPaintballs = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool m_bDoPaintballs = 0;
bool m_bDoPaintballs = false;

NetServerPlayerID m_PlayerSocket;
bool m_bIsJoined = false;
unsigned short m_usBitStreamVersion = 0;
NetServerPlayerID m_PlayerSocket ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
NetServerPlayerID m_PlayerSocket ;
NetServerPlayerID m_PlayerSocket;

@ccw808
Copy link
Member

ccw808 commented Jul 5, 2019

I think it would be safer if we could remove ZERO_ON_NEW in an automated way

@sbx320
Copy link
Member Author

sbx320 commented Jul 5, 2019

I just found that clang-tidy can apparently automate that for us:

https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines-pro-type-member-init.html

Getting clang-tidy to work with MTA is slightly complicated (as premake has no support for it), but I've done that before. The only downside to this it that we'd end up with everything in the constructor rather than inline in the headers, but I guess that's fine.

I'll see if I can get this going tomorrow.

@sbx320 sbx320 closed this Aug 17, 2019
@sbx320 sbx320 deleted the bugfix/zeroonnew branch April 26, 2020 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants