Skip to content

Commit ac4ed95

Browse files
committed
MSVC fixes
1 parent 423304d commit ac4ed95

File tree

5 files changed

+13
-17
lines changed

5 files changed

+13
-17
lines changed

src/CDI/common/types.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ struct InternalRegister
5353
uint32_t address;
5454
uint32_t value;
5555
std::string disassembledValue;
56-
57-
InternalRegister(std::string_view name, uint32_t address, uint32_t value, std::string_view disassembledValue)
58-
: name(name), address(address), value(value), disassembledValue(disassembledValue)
59-
{}
6056
};
6157

6258
struct RAMBank

src/CDI/cores/MCD212/Registers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ std::vector<InternalRegister> MCD212::GetControlRegisters() const
119119

120120
for(size_t i = 0; i < m_renderer.m_cursorPatterns.size(); i++)
121121
registers.emplace_back("Cursor Pattern " + std::to_string(i), CursorPattern + 0x80, m_renderer.m_cursorPatterns[i], "");
122-
for(size_t i = 0; i < m_renderer.m_matteControl.size(); i++)
122+
for(uint32_t i = 0; i < m_renderer.m_matteControl.size(); i++)
123123
registers.emplace_back("Region Control " + std::to_string(i), RegionControl + 0x80 + i, m_renderer.m_matteControl[i], "");
124124

125125
registers.emplace_back("Backdrop Color", BackdropColor + 0x80, m_renderer.m_backdropColor, "");

src/CDI/cores/SCC68070/InstructionSet.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2284,14 +2284,14 @@ uint16_t SCC68070::ROXm()
22842284
{
22852285
const uint16_t msb = data & 0x8000;
22862286
data <<= 1;
2287-
data |= GetX();
2287+
data |= static_cast<uint16_t>(GetX());
22882288
SetXC(msb);
22892289
}
22902290
else // Right
22912291
{
22922292
const uint16_t lsb = data & 1;
22932293
data >>= 1;
2294-
data |= GetX() << 15;
2294+
data |= static_cast<uint16_t>(GetX()) << 15;
22952295
SetXC(lsb);
22962296
}
22972297

@@ -2338,7 +2338,7 @@ uint16_t SCC68070::ROXr()
23382338
{
23392339
const uint32_t msb = data & msbMask;
23402340
data <<= 1;
2341-
data |= GetX();
2341+
data |= static_cast<uint32_t>(GetX());
23422342
SetXC(msb);
23432343
}
23442344
}
@@ -2348,7 +2348,7 @@ uint16_t SCC68070::ROXr()
23482348
{
23492349
const uint32_t lsb = data & 1;
23502350
data >>= 1;
2351-
data |= GetX() << msbShift;
2351+
data |= static_cast<uint32_t>(GetX()) << msbShift;
23522352
SetXC(lsb);
23532353
}
23542354
}

src/CDI/cores/SCC68070/SCC68070.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,37 +358,37 @@ void SCC68070::DumpCPURegisters()
358358
void SCC68070::SetS(const bool S)
359359
{
360360
SR &= 0b1101'1111'1111'1111;
361-
SR |= S << 13;
361+
SR |= static_cast<uint16_t>(S) << 13;
362362
}
363363

364364
void SCC68070::SetX(const bool X)
365365
{
366366
SR &= 0b1111'1111'1110'1111;
367-
SR |= X << 4;
367+
SR |= static_cast<uint16_t>(X) << 4;
368368
}
369369

370370
void SCC68070::SetN(const bool N)
371371
{
372372
SR &= 0b1111'1111'1111'0111;
373-
SR |= N << 3;
373+
SR |= static_cast<uint16_t>(N) << 3;
374374
}
375375

376376
void SCC68070::SetZ(const bool Z)
377377
{
378378
SR &= 0b1111'1111'1111'1011;
379-
SR |= Z << 2;
379+
SR |= static_cast<uint16_t>(Z) << 2;
380380
}
381381

382382
void SCC68070::SetV(const bool V)
383383
{
384384
SR &= 0b1111'1111'1111'1101;
385-
SR |= V << 1;
385+
SR |= static_cast<uint16_t>(V) << 1;
386386
}
387387

388388
void SCC68070::SetC(const bool C)
389389
{
390390
SR &= 0b1111'1111'1111'1110;
391-
SR |= C;
391+
SR |= static_cast<uint16_t>(C);
392392
}
393393

394394
void SCC68070::SetXC(const bool XC)

tests/testRenderer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ static constexpr void configureTwoMattes(Video::Renderer& renderer) noexcept
190190
renderer.m_matteControl[7] = makeCommand(0b0110, false, 63, 8); // ICF B 63, ignored.
191191
}
192192

193-
static constexpr void configureCLUT(Video::Renderer& renderer) noexcept
193+
static void configureCLUT(Video::Renderer& renderer) noexcept
194194
{
195195
renderer.m_backdropColor = 0b1001; // Blue.
196196
renderer.m_codingMethod[PLANEA] = ICM(CLUT7);
@@ -283,7 +283,7 @@ TEST_CASE("Matte", "[Video]")
283283
std::array<Video::Pixel, 768> array{
284284
HIDDEN_RED, HIDDEN_RED, RED, RED,
285285
};
286-
std::fill(array.data() + 4, array.end(), RED);
286+
std::fill(array.begin() + 4, array.end(), RED);
287287
return array;
288288
}();
289289
constexpr std::array<Video::Pixel, 768> EXPECTED_B = [] () {

0 commit comments

Comments
 (0)