mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Ranged for loop. Because ~~clean code~~.
This commit is contained in:
parent
854cbeef71
commit
288fd1319c
@ -167,8 +167,8 @@ inline void push(lua_State* L, const std::string& str) {
|
|||||||
|
|
||||||
template<typename T, size_t N>
|
template<typename T, size_t N>
|
||||||
inline void push(lua_State* L, const std::array<T, N>& data) {
|
inline void push(lua_State* L, const std::array<T, N>& data) {
|
||||||
for (std::size_t i = 0; i < data.size(); ++i) {
|
for (auto&& i : data) {
|
||||||
push(L, data[ i ]);
|
push(L, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user