Fix build error: ‘temp’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
Fixes #4753pull/4754/head
parent
5a89d6fee1
commit
3705336467
|
@ -205,7 +205,7 @@ private:
|
||||||
const char *key_name) {
|
const char *key_name) {
|
||||||
aiNode *global_info = get_global_info(scene);
|
aiNode *global_info = get_global_info(scene);
|
||||||
EXPECT_NE(nullptr, global_info);
|
EXPECT_NE(nullptr, global_info);
|
||||||
T temp;
|
T temp = 0;
|
||||||
EXPECT_TRUE(global_info->mMetaData->Get(key_name, temp));
|
EXPECT_TRUE(global_info->mMetaData->Get(key_name, temp));
|
||||||
EXPECT_EQ(expected_value, temp);
|
EXPECT_EQ(expected_value, temp);
|
||||||
}
|
}
|
||||||
|
@ -216,7 +216,7 @@ private:
|
||||||
aiNode *global_info = get_global_info(scene);
|
aiNode *global_info = get_global_info(scene);
|
||||||
EXPECT_NE(nullptr, global_info);
|
EXPECT_NE(nullptr, global_info);
|
||||||
for (auto it = p_kv.begin(); it != p_kv.end(); ++it) {
|
for (auto it = p_kv.begin(); it != p_kv.end(); ++it) {
|
||||||
T temp;
|
T temp = 0;
|
||||||
EXPECT_TRUE(global_info->mMetaData->Get(it->second, temp));
|
EXPECT_TRUE(global_info->mMetaData->Get(it->second, temp));
|
||||||
EXPECT_EQ(it->first, temp);
|
EXPECT_EQ(it->first, temp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue