Specify overloads for visual studio

This commit is contained in:
2023-01-27 13:46:58 -07:00
committed by Celtic Minstrel
parent ed9a8b035a
commit 1442e290a0
2 changed files with 3 additions and 3 deletions

View File

@@ -971,7 +971,7 @@ void cParty::readFrom(const cTagFile& file) {
}
vector2d<int> shop_stock;
page["SHOPSTOCK"].extractSparse(shop_stock);
page["SHOPSTOCK"].extractSparse<int>(shop_stock);
for(size_t x = 0; x < shop_stock.width(); x++) {
for(size_t y = 0; y < shop_stock.height(); y++) {
store_limited_stock[x][y] = shop_stock[x][y];

View File

@@ -148,7 +148,7 @@ TEST_CASE("Complex tag file") {
sdf[0][0] = 12;
sdf[1][3] = 52;
sdf[5][9] = 81;
p3["SDF"].encodeSparse(sdf);
p3["SDF"].encodeSparse<int>(sdf);
std::map<std::string, std::string> dict{
{"foo", "bar"},
{"a b", "c d"},
@@ -269,7 +269,7 @@ TEST_CASE("Complex tag file") {
CHECK(records[4] == std::string(""));
CHECK(records[5] == std::string("Isn't it cool?"));
vector2d<int> sdf;
page["SDF"].extractSparse(sdf);
page["SDF"].extractSparse<int>(sdf);
REQUIRE(sdf.width() == 6);
REQUIRE(sdf.height() == 10);
CHECK(sdf[0][0] == 12);