Browse code

Remove the copy constructors from SBNK, SDAT and SSEQ.

(They were probably holdovers from copying the code from the NCSF creation tools.)

Naram Qashat authored on 2021/03/19 15:54:35
Showing 5 changed files
... ...
@@ -84,24 +84,6 @@ SBNK::SBNK(const std::string &fn) : filename(fn), instruments(), info()
84 84
 	memset(this->waveArc, 0, sizeof(this->waveArc));
85 85
 }
86 86
 
87
-SBNK::SBNK(const SBNK &sbnk) : filename(sbnk.filename), instruments(sbnk.instruments), info(sbnk.info)
88
-{
89
-	memcpy(this->waveArc, sbnk.waveArc, sizeof(this->waveArc));
90
-}
91
-
92
-SBNK &SBNK::operator=(const SBNK &sbnk)
93
-{
94
-	if (this != &sbnk)
95
-	{
96
-		this->filename = sbnk.filename;
97
-		this->instruments = sbnk.instruments;
98
-
99
-		memcpy(this->waveArc, sbnk.waveArc, sizeof(this->waveArc));
100
-		this->info = sbnk.info;
101
-	}
102
-	return *this;
103
-}
104
-
105 87
 void SBNK::Read(PseudoFile &file)
106 88
 {
107 89
 	uint32_t startOfSBNK = file.pos;
... ...
@@ -50,8 +50,6 @@ struct SBNK
50 50
 	INFOEntryBANK info;
51 51
 
52 52
 	SBNK(const std::string &fn = "");
53
-	SBNK(const SBNK &sbnk);
54
-	SBNK &operator=(const SBNK &sbnk);
55 53
 
56 54
 	void Read(PseudoFile &file);
57 55
 };
... ...
@@ -22,7 +22,4 @@ struct SDAT
22 22
 	INFOEntryPLAYER player;
23 23
 
24 24
 	SDAT(PseudoFile &file, uint32_t sseqToLoad);
25
-private:
26
-	SDAT(const SDAT &);
27
-	SDAT &operator=(const SDAT &);
28 25
 };
... ...
@@ -14,23 +14,6 @@ SSEQ::SSEQ(const std::string &fn) : filename(fn), data(), bank(nullptr), info()
14 14
 {
15 15
 }
16 16
 
17
-SSEQ::SSEQ(const SSEQ &sseq) : filename(sseq.filename), data(sseq.data), bank(sseq.bank), info(sseq.info)
18
-{
19
-}
20
-
21
-SSEQ &SSEQ::operator=(const SSEQ &sseq)
22
-{
23
-	if (this != &sseq)
24
-	{
25
-		this->filename = sseq.filename;
26
-		this->data = sseq.data;
27
-
28
-		this->bank = sseq.bank;
29
-		this->info = sseq.info;
30
-	}
31
-	return *this;
32
-}
33
-
34 17
 void SSEQ::Read(PseudoFile &file)
35 18
 {
36 19
 	uint32_t startOfSSEQ = file.pos;
... ...
@@ -21,8 +21,6 @@ struct SSEQ
21 21
 	INFOEntrySEQ info;
22 22
 
23 23
 	SSEQ(const std::string &fn = "");
24
-	SSEQ(const SSEQ &sseq);
25
-	SSEQ &operator=(const SSEQ &sseq);
26 24
 
27 25
 	void Read(PseudoFile &file);
28 26
 };