Browse code

Correct a few warnings Visual Studio was complaining about.

Naram Qashat authored on 2021/03/20 20:40:21
Showing 6 changed files
... ...
@@ -60,7 +60,7 @@ static struct
60 60
 	unsigned filled, used;
61 61
 	uint32_t bufferbytes, cycles;
62 62
 	int xfs_load, sync_type;
63
-} sndifwork = {std::vector<uint8_t>(), 0, 0, 0, 0, 0, 0};
63
+} sndifwork = { std::vector<uint8_t>(), 0, 0, 0, 0, 0, 0 };
64 64
 
65 65
 static void SNDIFDeInit() { }
66 66
 
... ...
@@ -52,7 +52,7 @@ static struct
52 52
 {
53 53
 	std::vector<uint8_t> rom;
54 54
 	unsigned entry;
55
-} loaderwork;
55
+} loaderwork = { std::vector<uint8_t>(), 0 };
56 56
 
57 57
 int mapgsf(uint8_t *d, int l, int &s)
58 58
 {
... ...
@@ -37,7 +37,7 @@ struct Override
37 37
 	int value;
38 38
 	int extraValue;
39 39
 
40
-	Override() : overriding(false) { }
40
+	Override() : overriding(false), cmd(0), value(0), extraValue(0) { }
41 41
 	bool operator()() const { return this->overriding; }
42 42
 	bool &operator()() { return this->overriding; }
43 43
 	int val(const uint8_t **pData, std::function<int (const uint8_t **)> reader, bool returnExtra = false)
... ...
@@ -247,7 +247,7 @@ void XSFConfig_NCSF::RefreshSoundView()
247 247
 	std::wstring buf;
248 248
 	for (size_t chanId = 0; chanId < 16; ++chanId)
249 249
 	{
250
-		auto chn = player->GetChannel(chanId);
250
+		const auto &chn = player->GetChannel(chanId);
251 251
 
252 252
 		if (chn.state > CS_START)
253 253
 		{
... ...
@@ -106,14 +106,14 @@ bool XSFPlayer_NCSF::LoadNCSF()
106 106
 	return this->RecursiveLoadNCSF(this->xSF.get(), 1);
107 107
 }
108 108
 
109
-XSFPlayer_NCSF::XSFPlayer_NCSF(const std::string &filename) : XSFPlayer()
109
+XSFPlayer_NCSF::XSFPlayer_NCSF(const std::string &filename) : XSFPlayer(), sseq(0), sdatData(), sdat(), player(), secondsPerSample(0), secondsIntoPlayback(0), secondsUntilNextClock(0), mutes()
110 110
 {
111 111
 	this->uses32BitSamplesClampedTo16Bit = true;
112 112
 	this->xSF.reset(new XSFFile(filename, 8, 12));
113 113
 }
114 114
 
115 115
 #ifdef _WIN32
116
-XSFPlayer_NCSF::XSFPlayer_NCSF(const std::wstring &filename) : XSFPlayer()
116
+XSFPlayer_NCSF::XSFPlayer_NCSF(const std::wstring &filename) : XSFPlayer(), sseq(0), sdatData(), sdat(), player(), secondsPerSample(0), secondsIntoPlayback(0), secondsUntilNextClock(0), mutes()
117 117
 {
118 118
 	this->uses32BitSamplesClampedTo16Bit = true;
119 119
 	this->xSF.reset(new XSFFile(filename, 8, 12));
... ...
@@ -64,7 +64,7 @@ static struct
64 64
 	std::vector<uint8_t> rom, sram;
65 65
 	bool first;
66 66
 	unsigned base;
67
-} loaderwork;
67
+} loaderwork = { std::vector<uint8_t>(), std::vector<uint8_t>(), false, 0 };
68 68
 
69 69
 class BUFFER
70 70
 {