1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-27 20:44:56 +00:00

make conversion functions inline

This commit is contained in:
Pavel Labath 2010-03-10 21:18:03 +01:00
parent b1a871b9b9
commit 68272383fa

View File

@ -65,7 +65,8 @@ namespace conky {
struct lua_traits<T, true, false, false> {
static const lua::Type type = lua::TNUMBER;
static std::pair<T, bool> convert(lua::state &l, int index, const std::string &)
static inline std::pair<T, bool>
convert(lua::state &l, int index, const std::string &)
{ return {l.tointeger(index), true}; }
};
@ -74,7 +75,8 @@ namespace conky {
struct lua_traits<T, false, true, false> {
static const lua::Type type = lua::TNUMBER;
static std::pair<T, bool> convert(lua::state &l, int index, const std::string &)
static inline std::pair<T, bool>
convert(lua::state &l, int index, const std::string &)
{ return {l.tonumber(index), true}; }
};
@ -83,7 +85,8 @@ namespace conky {
struct lua_traits<std::string, false, false, false> {
static const lua::Type type = lua::TSTRING;
static std::pair<std::string, bool> convert(lua::state &l, int index, const std::string &)
static inline std::pair<std::string, bool>
convert(lua::state &l, int index, const std::string &)
{ return {l.tostring(index), true}; }
};
@ -92,7 +95,8 @@ namespace conky {
struct lua_traits<bool, true, false, false> {
static const lua::Type type = lua::TBOOLEAN;
static std::pair<bool, bool> convert(lua::state &l, int index, const std::string &)
static inline std::pair<bool, bool>
convert(lua::state &l, int index, const std::string &)
{ return {l.toboolean(index), true}; }
};