Clean up macros a bit (#6444)

* Prefix `STRINGIFY` and `STR` macros with `LMMS_`

* Fix include guard macro names

* Remove unused macros
This commit is contained in:
Dominic Clark
2022-06-23 12:20:05 +01:00
committed by GitHub
parent c2fa2375dc
commit 96df9b006c
59 changed files with 66 additions and 94 deletions

View File

@@ -24,8 +24,8 @@
*/
#ifndef _DRUMSYNTH_H__
#define _DRUMSYNTH_H__
#ifndef DRUMSYNTH_H
#define DRUMSYNTH_H
#include <stdint.h>
#include "lmms_basics.h"
@@ -57,4 +57,4 @@ class DrumSynth {
} // namespace lmms
#endif
#endif // DRUMSYNTH_H

View File

@@ -22,8 +22,8 @@
*
*/
#ifndef MICRO_TIMER
#define MICRO_TIMER
#ifndef MICRO_TIMER_H
#define MICRO_TIMER_H
#include <chrono>
@@ -48,4 +48,4 @@ private:
} // namespace lmms
#endif
#endif // MICRO_TIMER_H

View File

@@ -38,7 +38,6 @@
#if !(defined(LMMS_HAVE_SYS_IPC_H) && defined(LMMS_HAVE_SEMAPHORE_H))
#define SYNC_WITH_SHM_FIFO
#define USE_QT_SEMAPHORES
#ifdef LMMS_HAVE_PROCESS_H
#include <process.h>

View File

@@ -61,7 +61,7 @@ namespace PLUGIN_NAME
inline QPixmap getIconPixmap( const QString& _name,
int _w = -1, int _h = -1, const char** xpm = nullptr )
{
return embed::getIconPixmap(QString("%1/%2").arg(STRINGIFY(PLUGIN_NAME), _name), _w, _h, xpm);
return embed::getIconPixmap(QString("%1/%2").arg(LMMS_STRINGIFY(PLUGIN_NAME), _name), _w, _h, xpm);
}
//QString getText( const char * _name );
@@ -132,7 +132,7 @@ public:
QString pixmapName() const override
{
return QString( STRINGIFY(PLUGIN_NAME) ) + "::" + m_name;
return QString( LMMS_STRINGIFY(PLUGIN_NAME) ) + "::" + m_name;
}
} ;

View File

@@ -136,8 +136,8 @@ using surroundSampleFrame = std::array<sample_t, SURROUND_CHANNELS>;
constexpr std::size_t LMMS_ALIGN_SIZE = 16;
#define STRINGIFY(s) STR(s)
#define STR(PN) #PN
#define LMMS_STRINGIFY(s) LMMS_STR(s)
#define LMMS_STR(PN) #PN
// Abstract away GUI CTRL key (linux/windows) vs ⌘ (apple)
constexpr const char* UI_CTRL_KEY =

View File

@@ -3,7 +3,7 @@
#ifdef __GNUC__
constexpr const char* LMMS_BUILDCONF_COMPILER_VERSION = "GCC " __VERSION__;
#elif defined(_MSC_VER)
constexpr const char* LMMS_BUILDCONF_COMPILER_VERSION = "MSVC " STRINGIFY(_MSC_FULL_VER);
constexpr const char* LMMS_BUILDCONF_COMPILER_VERSION = "MSVC " LMMS_STRINGIFY(_MSC_FULL_VER);
#else
constexpr const char* LMMS_BUILDCONF_COMPILER_VERSION = "unknown compiler";
#endif