Skip to content

Commit

Permalink
Only on gcc
Browse files Browse the repository at this point in the history
Use #if guard to prevent gcc pragma being seen elsewhere.
  • Loading branch information
GregoryLundberg committed Oct 17, 2016
1 parent ecdfb81 commit 8839a5e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/scripting/lua_kernel_base.cpp
Expand Up @@ -722,10 +722,14 @@ std::vector<std::string> lua_kernel_base::get_attribute_names(const std::string

lua_kernel_base*& lua_kernel_base::get_lua_kernel_base_ptr(lua_State *L)
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
#endif
return *reinterpret_cast<lua_kernel_base**>(lua_getextraspace(L));
#pragma GCC diagnostic pop
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
}

uint32_t lua_kernel_base::get_random_seed()
Expand Down

0 comments on commit 8839a5e

Please sign in to comment.