diff --git a/server/src/core/property.hpp b/server/src/core/property.hpp index bfeb6e49..5dca11c5 100644 --- a/server/src/core/property.hpp +++ b/server/src/core/property.hpp @@ -3,7 +3,7 @@ * * This file is part of the traintastic source code. * - * Copyright (C) 2019-2020 Reinder Feenstra + * Copyright (C) 2019-2020,2022 Reinder Feenstra * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -240,4 +240,10 @@ class Property : public AbstractProperty }; +template>* = nullptr> +inline bool contains(const Property& property, const T& mask) +{ + return (property.value() & mask) == mask; +} + #endif