Fix local variable shadowing

This commit is contained in:
Dmitry Marakasov 2015-09-16 22:51:39 +03:00
parent a8ec68a625
commit 9c89af064d

View File

@ -116,6 +116,7 @@ BEGIN_TEST()
}
// Short test for ContainerRWops
{
{
const std::vector<char> buffer = { 'a', 'b', 'c', 'd' };
@ -140,13 +141,15 @@ BEGIN_TEST()
EXPECT_TRUE(rw.Write(buf, 1, 4) == 0);
EXPECT_TRUE(rw.Write(buf, 4, 1) == 0);
}
}
{
// Write to non-const container
std::vector<char> vec;
RWops rw((ContainerRWops<std::vector<char>>(vec)));
{
// Write to non-const container
char buf[4] = {'a', 'b', 'c', 'd'};
EXPECT_TRUE(rw.Write(buf, 1, 4) == 4);
@ -159,6 +162,7 @@ BEGIN_TEST()
EXPECT_TRUE(std::string(vec.data(), 8) == "ababcdcd");
}
}
}
// Test for StreamRWops
{