// Luanti // SPDX-License-Identifier: LGPL-2.1-or-later // Copyright (C) 2013 celeron55, Perttu Ahola #pragma once #include #include typedef std::unordered_map ItemGroupList; static inline int itemgroup_get(const ItemGroupList &groups, const std::string &name) { ItemGroupList::const_iterator i = groups.find(name); if (i == groups.end()) return 0; return i->second; }