Debian Codegraph @

xbmc/guilib/guiinfo/GUIInfo.cpp

raw symbols SCIP
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9 #include "GUIInfo.h"
10
11 #include <assert.h>
12
13 using namespace KODI::GUILIB::GUIINFO;
14
15 void CGUIInfo::SetInfoFlag(uint32_t flag)
16 {
17 assert(flag >= (1 << 24));
18 m_data1 |= flag;
19 }
20
21 uint32_t CGUIInfo::GetInfoFlag() const
22 {
23 // we strip out the bottom 24 bits, where we keep data
24 // and return the flag only
25 return m_data1 & 0xff000000;
26 }
27
28 uint32_t CGUIInfo::GetData1() const
29 {
30 // we strip out the top 8 bits, where we keep flags
31 // and return the unflagged data
32 return m_data1 & ((1 << 24) -1);
33 }