From 4da128e5106326374ad1162da6e8cc3dce73fb9f Mon Sep 17 00:00:00 2001 From: Avril Date: Mon, 8 Nov 2021 07:28:54 +0000 Subject: [PATCH] Moved dynctor registration into `rng.cpp` (seems to work in *this* TU too. Why not `rng/sm64.cpp` specifically???? very annoying.) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fortune for rngxx's current commit: Small curse − 小凶 --- include/rngxx/internal/dctor.h | 2 +- src/rng.cpp | 3 +++ src/rng/crand.cpp | 2 -- src/rng/sm64.cpp | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/rngxx/internal/dctor.h b/include/rngxx/internal/dctor.h index b89a4f6..19f6f43 100644 --- a/include/rngxx/internal/dctor.h +++ b/include/rngxx/internal/dctor.h @@ -6,7 +6,7 @@ #include #include -// For some reason, dctors defined in any other file than crand.cpp do not work??! +// For some reason, dctors defined in some files do not work??! RNGXX_APPLY_CTOR(rng, sm64, u64); RNGXX_APPLY_CTOR(rng, crand, u64); diff --git a/src/rng.cpp b/src/rng.cpp index dde3cdf..d46cc45 100644 --- a/src/rng.cpp +++ b/src/rng.cpp @@ -75,3 +75,6 @@ N_INTS #undef NEXTT #undef NEXT // --- + +//TODO: Why does this have to be in a specific TU to work? +#include "../internal/dctor.h" diff --git a/src/rng/crand.cpp b/src/rng/crand.cpp index 098dab9..54825a0 100644 --- a/src/rng/crand.cpp +++ b/src/rng/crand.cpp @@ -70,5 +70,3 @@ namespace rng } -//TODO: Why does this have to be in THIS TU? -#include "../internal/dctor.h" diff --git a/src/rng/sm64.cpp b/src/rng/sm64.cpp index cd133c6..b525a5b 100644 --- a/src/rng/sm64.cpp +++ b/src/rng/sm64.cpp @@ -10,3 +10,5 @@ #include #include #include "crand.h" + +//TODO: Why does dynctors defined in this TU not function properly? Is it because there's nothing else in here?