Skip to content

Commit

Permalink
Replace BUILD_DEBUG by NDEBUG
Browse files Browse the repository at this point in the history
Use the "standard" NDEBUG definition, which is used by assert().
  • Loading branch information
rom1v committed Nov 27, 2019
1 parent 73e8ec1 commit b5ebb23
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ endif
conf = configuration_data()

# expose the build type
conf.set('BUILD_DEBUG', get_option('buildtype') == 'debug')
conf.set('NDEBUG', get_option('buildtype') != 'debug')

# the version, updated on release
conf.set_quoted('SCRCPY_VERSION', meson.project_version())
Expand Down
2 changes: 1 addition & 1 deletion app/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ main(int argc, char *argv[]) {
return 1;
}

#ifdef BUILD_DEBUG
#ifndef NDEBUG
SDL_LogSetAllPriority(SDL_LOG_PRIORITY_DEBUG);
#endif

Expand Down
2 changes: 1 addition & 1 deletion app/src/tiny_xpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ find_color(struct index *index, int len, char c, uint32_t *color) {
// (non-const) "char *"
SDL_Surface *
read_xpm(char *xpm[]) {
#if SDL_ASSERT_LEVEL >= 2
#ifndef NDEBUG
// patch the XPM to change the icon color in debug mode
xpm[2] = ". c #CC00CC";
#endif
Expand Down

0 comments on commit b5ebb23

Please sign in to comment.