Skip to content

Commit

Permalink
cppcheck #2
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan-velicu committed Oct 26, 2023
1 parent 6f4c505 commit 076925f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doodle_jump/platform/PlatformGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ PlatformGenerator& PlatformGenerator::operator=(const PlatformGenerator& platfor

PlatformGenerator::PlatformGenerator(const PlatformGenerator& platformGenerator_) {
std::cout << "PlatformGenerator copy constructor called\n";
lastPlatform = platformGenerator_.lastPlatform;
lastPlatform = new Platform();
*lastPlatform = *platformGenerator_.lastPlatform;
}

// Platform PlatformGenerator::getLastPlatform() {
Expand Down

0 comments on commit 076925f

Please sign in to comment.