Skip to content
Permalink
Browse files

TITANIC: Remove redundant static from CStarControlSub6

It was only ever used as a temporary matrix in the constructor.
Given that, it was cleaner to simply declare it as a local variable.
  • Loading branch information
dreammaster committed Mar 27, 2017
1 parent 765ec88 commit a925264fb03a8ccbde9390fd9a18be23232851dd
@@ -43,13 +43,11 @@ END_MESSAGE_MAP()

CStarControl::CStarControl() : _enabled(false),
_starRect(20, 10, 620, 350) {
CStarControlSub6::init();
CStarControlSub12::init();
DMatrix::init();
}

CStarControl::~CStarControl() {
CStarControlSub6::deinit();
CStarControlSub12::deinit();
DMatrix::deinit();
}
@@ -24,8 +24,6 @@

namespace Titanic {

CStarControlSub6 *CStarControlSub6::_static;

CStarControlSub6::CStarControlSub6() {
clear();
}
@@ -80,15 +78,6 @@ CStarControlSub6::CStarControlSub6(const CStarControlSub6 *s1, const CStarContro
+ s2->_vector._z;
}

void CStarControlSub6::init() {
_static = nullptr;
}

void CStarControlSub6::deinit() {
delete _static;
_static = nullptr;
}

void CStarControlSub6::identity() {
FMatrix::identity();
_vector.clear();
@@ -28,11 +28,6 @@
namespace Titanic {

class CStarControlSub6 : public FMatrix {
private:
static CStarControlSub6 *_static;
public:
static void init();
static void deinit();
public:
FVector _vector;
public:

0 comments on commit a925264

Please sign in to comment.
You can’t perform that action at this time.