Skip to content

Commit

Permalink
Fix "unknown pragma" warnings on gcc.
Browse files Browse the repository at this point in the history
  • Loading branch information
jostephd committed Oct 14, 2018
1 parent 0f129f2 commit e77bb34
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/scripting/lua_common.cpp
Expand Up @@ -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.
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable: 4189)
#endif

const_attr_itors* cai = static_cast<const_attr_itors*>(p);
cai->~const_attr_itors();

#if defined(_MSC_VER)
#pragma warning(pop)
#endif

return 0;
}
Expand Down

0 comments on commit e77bb34

Please sign in to comment.