Skip to content

Commit

Permalink
comaptibility-issue with older GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
ptahmose committed Dec 2, 2023
1 parent 0da49f2 commit 83fb037
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions Src/libCZI_UnitTests/test_metadatareading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ TEST(MetadataReading, ScalingInfoExTest)
EXPECT_DOUBLE_EQ(scalingInfo.scaleY, 1.6432520108980473e-07);
EXPECT_FALSE(scalingInfo.IsScaleZValid());

EXPECT_TRUE(scalingInfo.defaultUnitFormatX == L"um");
EXPECT_TRUE(scalingInfo.defaultUnitFormatY == L"um");
EXPECT_TRUE(scalingInfo.defaultUnitFormatX.compare(L"um") == 0);
EXPECT_TRUE(scalingInfo.defaultUnitFormatY.compare(L"um") == 0);
EXPECT_TRUE(scalingInfo.defaultUnitFormatZ.empty());
}

Expand Down Expand Up @@ -274,8 +274,8 @@ static void EnumAllRecursively(IXmlNodeRead* node, std::function<bool(std::share
return false;
}

EnumAllRecursively(n.get(), func);
return true;
EnumAllRecursively(n.get(), func);
return true;
});
}

Expand All @@ -291,7 +291,7 @@ TEST(MetadataReading, WalkChildrenTest1)
[&](std::shared_ptr<IXmlNodeRead> n)->bool
{
names.push_back(utf8_conv.to_bytes(n->Name()));
return true;
return true;
});

auto cnt = md.use_count();
Expand All @@ -317,15 +317,15 @@ TEST(MetadataReading, WalkChildrenTest2)
{
string s(utf8_conv.to_bytes(n->Name()));

n->EnumAttributes(
[&](const std::wstring& attribName, const std::wstring& attribValue)->bool
{
s += ":" + utf8_conv.to_bytes(attribName) + "=" + utf8_conv.to_bytes(attribValue);
return true;
});
n->EnumAttributes(
[&](const std::wstring& attribName, const std::wstring& attribValue)->bool
{
s += ":" + utf8_conv.to_bytes(attribName) + "=" + utf8_conv.to_bytes(attribValue);
return true;
});

namesAndAttributes.push_back(s);
return true;
namesAndAttributes.push_back(s);
return true;
});

auto cnt = md.use_count();
Expand All @@ -350,14 +350,14 @@ TEST(MetadataReading, WalkChildrenTest3)
[&](std::shared_ptr<IXmlNodeRead> n)->bool
{
string s(utf8_conv.to_bytes(n->Name()));
wstring value;
if (n->TryGetValue(&value))
{
s += " -> " + utf8_conv.to_bytes(value);
}
wstring value;
if (n->TryGetValue(&value))
{
s += " -> " + utf8_conv.to_bytes(value);
}

namesAndValue.push_back(s);
return true;
namesAndValue.push_back(s);
return true;
});

auto cnt = md.use_count();
Expand Down

0 comments on commit 83fb037

Please sign in to comment.