Commit 1126b00f authored by ussrhero's avatar ussrhero

fixed printing struct with const members

parent 538ab3d7
......@@ -1081,6 +1081,11 @@ std::wstring TypedVarUdt::str()
TypeInfoPtr fieldType = m_typeInfo->getElement(i);
TypedVarPtr fieldVar;
if (m_typeInfo->isConstMember(i))
{
continue;
}
else
if ( m_typeInfo->isStaticMember(i) )
{
MEMOFFSET_64 staticOffset = m_typeInfo->getElementVa(i);
......
......@@ -554,6 +554,7 @@ TEST_F(TypedVarTest, Str)
EXPECT_NO_THROW( str = loadTypedVar(L"g_classChild")->str() );
EXPECT_NO_THROW( str = loadTypedVar(L"CdeclFuncLong")->str() );
EXPECT_NO_THROW( str = loadTypedVar(L"g_classChild")->getMethod( L"childMethod")->str() );
}
......@@ -726,4 +727,7 @@ TEST_F(TypedVarTest, StructNestedEnum)
{
EXPECT_EQ(g_structWithEnum.digit, *loadTypedVar(L"g_structWithEnum")->getElement(L"digit"));
EXPECT_EQ(g_structWithNested.NestConst, *loadTypedVar(L"g_structWithNested")->getElement(L"NestConst"));
std::wstring s;
EXPECT_NO_THROW(s = loadTypedVar(L"g_structWithNested")->str());
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment