Page MenuHomeWildfire Games

Remove manual memory management in CWorld
ClosedPublic

Authored by phosit on Sep 27 2023, 6:57 PM.

Details

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

phosit created this revision.Sep 27 2023, 6:57 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/7341/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/8430/display/redirect

phosit requested review of this revision.Sep 27 2023, 7:26 PM
sera added a subscriber: sera.Sep 27 2023, 7:34 PM
sera added inline comments.
source/ps/World.cpp
49 ↗(On Diff #22332)

comment needs fixing

75 ↗(On Diff #22332)

mixing of NULL and nullptr

phosit added inline comments.Sep 27 2023, 7:42 PM
source/ps/World.cpp
75 ↗(On Diff #22332)

I changed it on *lines* which i edited.
It might make sense to change it in *statements* i edited. Should i change it?

vladislavbelov added inline comments.Sep 27 2023, 7:47 PM
source/ps/World.h
27–28 ↗(On Diff #22332)
#include "ps/CStrForward.h"
#include "ps/Errors.h"

#include <memory>
50 ↗(On Diff #22332)

game.

sera added inline comments.Sep 27 2023, 7:56 PM
source/ps/World.cpp
75 ↗(On Diff #22332)

In an ideal world I'd go for two commits, first NULL -> nullptr, then the rest.

The result shouldn't be a mix, leaving everything NULL seems honestly preferable.

phosit updated this revision to Diff 22333.Sep 27 2023, 8:22 PM
  • pGame -> game
  • edit comment
  • NULL -> nullptr

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/7342/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/8431/display/redirect

vladislavbelov accepted this revision.Sep 28 2023, 9:30 PM
This revision is now accepted and ready to land.Sep 28 2023, 9:30 PM
sera added inline comments.Sep 28 2023, 10:20 PM
source/ps/World.cpp
73 ↗(On Diff #22333)

missed another NULL :)

phosit updated this revision to Diff 22347.Oct 1 2023, 11:50 AM

NULL -> nullptr two more times

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/7352/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/8441/display/redirect

vladislavbelov accepted this revision.Oct 1 2023, 7:13 PM
This revision was landed with ongoing or failed builds.Oct 2 2023, 9:47 PM
This revision was automatically updated to reflect the committed changes.