Fix build with GCC and Clang

This commit is contained in:
Jyrki Vesterinen 2018-03-24 11:11:25 +02:00
parent d4c9db9e35
commit 2257c03771
2 changed files with 6 additions and 2 deletions

View file

@ -36,8 +36,8 @@ struct rect_of_hexes
rect_of_hexes()
: left(0)
, right(-1) // end is right + 1
, top{0,0}
, bottom{0,0}
, top{{0,0}}
, bottom{{0,0}}
{
}

View file

@ -303,13 +303,17 @@ static int impl_vconfig_pairs_collect(lua_State *L)
void* p = lua_touserdata(L, 1);
// Triggers a false positive of C4189 with Visual Studio. Suppress.
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4189)
#endif
const_attr_itors* cai = static_cast<const_attr_itors*>(p);
cai->~const_attr_itors();
#ifdef _MSC_VER
#pragma warning(pop)
#endif
return 0;
}