Remove underscores from value-defined macros
This commit is contained in:
parent
e59d6f1312
commit
f41a509f6d
@ -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__ */
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
4
setup.py
4
setup.py
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user