all: assorted updates and cleanups

This commit is contained in:
Markus F.X.J. Oberhumer
2023-02-05 17:20:32 +01:00
parent 163377d1a0
commit b8d9c2b755
56 changed files with 691 additions and 853 deletions
+7 -7
View File
@@ -31,7 +31,7 @@
//
**************************************************************************/
unsigned long Throwable::counter = 0;
/*static*/ upx_std_atomic(size_t) Throwable::debug_counter;
Throwable::Throwable(const char *m, int e, bool w) noexcept : super(),
msg(nullptr),
@@ -40,8 +40,8 @@ Throwable::Throwable(const char *m, int e, bool w) noexcept : super(),
if (m)
msg = strdup(m);
#if 0
fprintf(stderr, "construct exception: %s %lu\n", msg, counter);
counter++;
fprintf(stderr, "construct exception: %s %zu\n", msg, debug_counter);
debug_counter += 1;
#endif
}
@@ -52,15 +52,15 @@ Throwable::Throwable(const Throwable &other) noexcept : super(other),
if (other.msg)
msg = strdup(other.msg);
#if 0
fprintf(stderr, "copy exception: %s %lu\n", msg, counter);
counter++;
fprintf(stderr, "copy exception: %s %zu\n", msg, debug_counter);
debug_counter += 1;
#endif
}
Throwable::~Throwable() noexcept {
#if 0
counter--;
fprintf(stderr, "destruct exception: %s %lu\n", msg, counter);
debug_counter -= 1;
fprintf(stderr, "destruct exception: %s %zu\n", msg, debug_counter);
#endif
if (msg)
free(msg);