Remove underscores from value-defined macros

This commit is contained in:
Rico Tiongson 2019-03-03 22:56:37 +08:00
parent e59d6f1312
commit f41a509f6d
4 changed files with 11 additions and 11 deletions

View File

@ -1,12 +1,12 @@
#ifndef __COMFORTABLE_SWIPE__macro_hpp__ #ifndef __COMFORTABLE_SWIPE__macro_hpp__
#define __COMFORTABLE_SWIPE__macro_hpp__ #define __COMFORTABLE_SWIPE__macro_hpp__
#ifndef __COMFORTABLE_SWIPE__CONFIG__ #ifndef COMFORTABLE_SWIPE_CONFIG
#warning "__COMFORTABLE_SWIPE__CONFIG__ must be defined." #error "COMFORTABLE_SWIPE_CONFIG must be defined."
#endif /* __COMFORTABLE_SWIPE__CONFIG__ */ #endif /* COMFORTABLE_SWIPE_CONFIG */
#ifndef __COMFORTABLE_SWIPE__VERSION__ #ifndef COMFORTABLE_SWIPE_VERSION
#warning "__COMFORTABLE_SWIPE__VERSION__ must be defined." #warning "COMFORTABLE_SWIPE_VERSION is not defined."
#endif /* __COMFORTABLE_SWIPE__VERSION__ */ #endif /* COMFORTABLE_SWIPE_VERSION */
#endif /* __COMFORTABLE_SWIPE__macro_hpp__ */ #endif /* __COMFORTABLE_SWIPE__macro_hpp__ */

View File

@ -32,7 +32,7 @@ namespace comfortable_swipe::service
void buffer() void buffer()
{ {
// read config file // read config file
auto config = comfortable_swipe::util::read_config_file(__COMFORTABLE_SWIPE__CONFIG__); auto config = comfortable_swipe::util::read_config_file(COMFORTABLE_SWIPE_CONFIG);
// initialize swipe gesture handler // initialize swipe gesture handler
comfortable_swipe::gesture::swipe_gesture swipe_gesture_handler comfortable_swipe::gesture::swipe_gesture swipe_gesture_handler

View File

@ -42,8 +42,8 @@ namespace comfortable_swipe::service
// check status of configuration file // check status of configuration file
try try
{ {
std::puts(__COMFORTABLE_SWIPE__CONFIG__); std::puts(COMFORTABLE_SWIPE_CONFIG);
auto config = comfortable_swipe::util::read_config_file(__COMFORTABLE_SWIPE__CONFIG__); auto config = comfortable_swipe::util::read_config_file(COMFORTABLE_SWIPE_CONFIG);
// print threshold // print threshold
if (config.count("threshold") > 0) if (config.count("threshold") > 0)
{ {

View File

@ -45,8 +45,8 @@ try:
# for C++ library # for C++ library
cpp_macros = dict( cpp_macros = dict(
__COMFORTABLE_SWIPE__VERSION__='"{}"'.format(VERSION), COMFORTABLE_SWIPE_VERSION='"{}"'.format(VERSION),
__COMFORTABLE_SWIPE__CONFIG__='"{}"'.format(CONFIG) COMFORTABLE_SWIPE_CONFIG='"{}"'.format(CONFIG)
) )
# read C++ libraries for comfortable swipe # read C++ libraries for comfortable swipe