diff options
author | Max Kellermann <max@duempel.org> | 2015-08-24 11:19:19 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-08-24 11:20:45 +0200 |
commit | 2f5106c97f7c3c198650b1b6951b71c5d492aaa7 (patch) | |
tree | f50b1e762394b60029bc605705d56da326806fb6 /src/tag/Settings.hxx | |
parent | 0c19418e84a4db3f1e5a9ca143d5986a104a5675 (diff) | |
download | mpd-2f5106c97f7c3c198650b1b6951b71c5d492aaa7.tar.gz mpd-2f5106c97f7c3c198650b1b6951b71c5d492aaa7.tar.xz mpd-2f5106c97f7c3c198650b1b6951b71c5d492aaa7.zip |
tag/Settings: convert to C++
Diffstat (limited to 'src/tag/Settings.hxx')
-rw-r--r-- | src/tag/Settings.hxx | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/tag/Settings.hxx b/src/tag/Settings.hxx new file mode 100644 index 000000000..42d0dc684 --- /dev/null +++ b/src/tag/Settings.hxx @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2003-2015 The Music Player Daemon Project + * http://www.musicpd.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef MPD_TAG_SETTINGS_HXX +#define MPD_TAG_SETTINGS_HXX + +#include "TagType.h" +#include "Compiler.h" + +#include <stdint.h> + +typedef uint_least32_t tag_mask_t; + +extern tag_mask_t global_tag_mask; + +gcc_const +static inline bool +IsTagEnabled(unsigned tag) +{ + return global_tag_mask & (1u << tag); +} + +gcc_const +static inline bool +IsTagEnabled(TagType tag) +{ + return IsTagEnabled(unsigned(tag)); +} + +#endif |