From 22e77130e2c8eb94238171b4cd0f7b5c9d15e1e5 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 21 Jun 2022 21:47:04 -0600 Subject: [PATCH] use new macros to cleanup #ifndef NDEBUG as much as possible (GUI edition) --- gtk2_ardour/sfdb_freesound_mootcher.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/gtk2_ardour/sfdb_freesound_mootcher.cc b/gtk2_ardour/sfdb_freesound_mootcher.cc index b058fbec05..518d96ddd8 100644 --- a/gtk2_ardour/sfdb_freesound_mootcher.cc +++ b/gtk2_ardour/sfdb_freesound_mootcher.cc @@ -439,8 +439,9 @@ int audioFileWrite(void *buffer, size_t size, size_t nmemb, void *file) //------------------------------------------------------------------------ void * -Mootcher::threadFunc() { -CURLcode res; +Mootcher::threadFunc() +{ + CURLcode res; DEBUG_TRACE(PBD::DEBUG::Freesound, "threadFunc\n"); res = curl_easy_perform (curl); @@ -457,11 +458,9 @@ CURLcode res; DEBUG_TRACE(PBD::DEBUG::Freesound, string_compose("renaming %1.part to %1\n", audioFileName)); int r = rename ( (audioFileName+".part").c_str(), audioFileName.c_str() ); if (r != 0) { -#ifndef NDEBUG - const char *err = strerror(errno); -#endif - DEBUG_TRACE(PBD::DEBUG::Freesound, string_compose("rename() failed: %1\n", err)); - assert(0); + const char * err = strerror(errno); + fatal << string_compose (_("programming error: %1\n"), string_compose (X_("freesound rename failed %1"), err)); + abort (); /* XXX probably not appropriat */ } else { // now download the tags &c. getSoundResourceFile(ID);