From 9de5b57989fa166835bf33184ac48624cf00d814 Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 3 Apr 2020 16:49:46 -0700 Subject: [PATCH] Remove blockclass::clear(), simplify blockclass initializations Previously, it was used in order to clear a block and deactivate it, and the constructor function simply called clear() in order to not duplicate code. However, clear() is no longer necessary (just remove the block from the blocks vector), and so we can put initialization right back in the constructor function. --- desktop_version/src/BlockV.cpp | 5 ----- desktop_version/src/BlockV.h | 2 -- 2 files changed, 7 deletions(-) diff --git a/desktop_version/src/BlockV.cpp b/desktop_version/src/BlockV.cpp index 041553dc..249db33e 100644 --- a/desktop_version/src/BlockV.cpp +++ b/desktop_version/src/BlockV.cpp @@ -1,11 +1,6 @@ #include "BlockV.h" blockclass::blockclass() -{ - clear(); -} - -void blockclass::clear() { type = 0; trigger = 0; diff --git a/desktop_version/src/BlockV.h b/desktop_version/src/BlockV.h index a879874d..525e9383 100644 --- a/desktop_version/src/BlockV.h +++ b/desktop_version/src/BlockV.h @@ -9,8 +9,6 @@ class blockclass public: blockclass(); - void clear(); - void rectset(const int xi, const int yi, const int wi, const int hi); void setblockcolour(std::string col);