mirror of https://github.com/OpenMW/openmw.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
335 B
C++
21 lines
335 B
C++
6 months ago
|
#ifndef COMPONENTS_LUA_UTIL_H
|
||
|
#define COMPONENTS_LUA_UTIL_H
|
||
|
|
||
|
#include <cstdint>
|
||
|
|
||
|
namespace LuaUtil
|
||
|
{
|
||
|
// Lua arrays index from 1
|
||
|
constexpr inline std::int64_t fromLuaIndex(std::int64_t i)
|
||
|
{
|
||
|
return i - 1;
|
||
|
}
|
||
|
|
||
|
constexpr inline std::int64_t toLuaIndex(std::int64_t i)
|
||
|
{
|
||
|
return i + 1;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#endif
|