Skip to content

Commit 92b136d

Browse files
committed
[globals] remove macro XBMC_GLOBAL
1 parent e83e2f9 commit 92b136d

File tree

4 files changed

+6
-15
lines changed

4 files changed

+6
-15
lines changed

xbmc/guilib/GraphicContext.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,6 @@ class CGraphicContext : public CCriticalSection,
296296
\brief
297297
*/
298298

299-
XBMC_GLOBAL(CGraphicContext,g_graphicsContext);
300-
299+
XBMC_GLOBAL_REF(CGraphicContext,g_graphicsContext);
300+
#define g_graphicsContext XBMC_GLOBAL_USE(CGraphicContext)
301301
#endif

xbmc/settings/AdvancedSettings.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,4 +400,5 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler
400400
void setExtraLogLevel(const std::vector<CVariant> &components);
401401
};
402402

403-
XBMC_GLOBAL(CAdvancedSettings,g_advancedSettings);
403+
XBMC_GLOBAL_REF(CAdvancedSettings,g_advancedSettings);
404+
#define g_advancedSettings XBMC_GLOBAL_USE(CAdvancedSettings)

xbmc/utils/CharsetConverter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,6 @@ class CCharsetConverter : public ISettingCallback
173173
class CInnerConverter;
174174
};
175175

176-
XBMC_GLOBAL(CCharsetConverter,g_charsetConverter);
177-
176+
XBMC_GLOBAL_REF(CCharsetConverter,g_charsetConverter);
177+
#define g_charsetConverter XBMC_GLOBAL_USE(CCharsetConverter)
178178
#endif

xbmc/utils/GlobalsHandling.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,3 @@ namespace xbmcutil
212212
* #define g_variable XBMC_GLOBAL_USE(classname)
213213
*/
214214
#define XBMC_GLOBAL_USE(classname) (*(xbmcutil::GlobalsSingleton<classname>::getQuick()))
215-
216-
/**
217-
* For pattern (1) above, you can use the following macro. WARNING: This should only
218-
* be used when the global in question is never accessed, directly or indirectly, from
219-
* a static method called (again, directly or indirectly) during startup or shutdown.
220-
*/
221-
#define XBMC_GLOBAL(classname,g_variable) \
222-
XBMC_GLOBAL_REF(classname,g_variable); \
223-
static classname & g_variable = (*(g_variable##Ref.get()))
224-

0 commit comments

Comments
 (0)