Skip to content

Commit 63378e7

Browse files
committed
Make MSVC happy. (note, this didn't build with MSVC 2022 with /std:c++latest, but we build with MSVC 2019 with the default C++14 features)
1 parent 91426d1 commit 63378e7

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/MCS04AnalyzerResults.cpp

+9-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,15 @@ void MCS04AnalyzerResults::GenerateBubbleText( U64 frame_index, Channel& channel
3030
if( channel == mSettings->mBusClk2 )
3131
{ // CLK2 shows bus phase, 1-based (0 means unknown/invalid)
3232

33-
static const char* busPhaseNames[] = {
34-
[MCS4busPhaseA1] = "A1", [MCS4busPhaseA2] = "A2", [MCS4busPhaseA3] = "A3", [MCS4busPhaseM1] = "M1",
35-
[MCS4busPhaseM2] = "M2", [MCS4busPhaseX1] = "X1", [MCS4busPhaseX2] = "X2", [MCS4busPhaseX3] = "X3",
36-
};
33+
static const char* busPhaseNames[ 9 ] = { 0 };
34+
busPhaseNames[ MCS4busPhaseA1 ] = "A1";
35+
busPhaseNames[ MCS4busPhaseA2 ] = "A2";
36+
busPhaseNames[ MCS4busPhaseA3 ] = "A3";
37+
busPhaseNames[ MCS4busPhaseM1 ] = "M1";
38+
busPhaseNames[ MCS4busPhaseM2 ] = "M2";
39+
busPhaseNames[ MCS4busPhaseX1 ] = "X1";
40+
busPhaseNames[ MCS4busPhaseX2 ] = "X2";
41+
busPhaseNames[ MCS4busPhaseX3 ] = "X2";
3742
const char* nm = data.busPhase < sizeof( busPhaseNames ) / sizeof( *busPhaseNames ) ? busPhaseNames[ data.busPhase ] : NULL;
3843

3944
AddResultString( nm ? nm : "<BUS PHASE INVALID>" );

src/MCS04Disasm.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,12 @@ void mcs04disasm( char* dLong, char* dMed, char* dShort, enum MCS4prevInstrState
122122
break;
123123

124124
case 0x0e:
125+
{
125126
static const char memOpsNames[][ 4 ] = { "WRM", "WMP", "WRR", "WPM", "WR0", "WR1", "WR2", "WR3",
126127
"SBM", "RDM", "RDR", "ADM", "RD0", "RD1", "RD2", "RD3" };
127128
strcpy( dLong, memOpsNames[ instr & 15 ] );
128-
break;
129+
}
130+
break;
129131

130132
case 0x0f:
131133
static const char fOpsNames[][ 4 ] = { "CLB", "CLC", "IAC", "CMC", "CMA", "RAL", "RAR", "TCC",

0 commit comments

Comments
 (0)