remove unnecessary 'new' operators

This commit is contained in:
MihailRis
2024-07-01 06:00:33 +03:00
parent 26e2068164
commit fab124a2e2
9 changed files with 36 additions and 42 deletions
+3 -1
View File
@@ -3,7 +3,9 @@
#include "../../graphics/core/Batch2D.hpp"
#include "../../engine.hpp"
Screen::Screen(Engine* engine) : engine(engine), batch(new Batch2D(1024)) {
Screen::Screen(Engine* engine)
: engine(engine),
batch(std::make_unique<Batch2D>(1024)) {
}
Screen::~Screen() {