star-line

Structure for accelerating line importance sampling
git clone git://git.meso-star.fr/star-line.git
Log | Files | Refs | README | LICENSE

commit 9ee065a9ed1e75649e31eb4f6421c832825be8b4
parent aebdade527ef087332bafcc6e328c63d7a30444c
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon, 23 May 2022 16:37:46 +0200

Minor upd of the err message when creating a mixture

Diffstat:
Msrc/sln_mixture.c | 13++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/sln_mixture.c b/src/sln_mixture.c @@ -193,16 +193,19 @@ check_sln_mixture_create_args } static res_T -create_mixture(struct sln_device* sln, struct sln_mixture** out_mixture) +create_mixture + (struct sln_device* sln, + const char* caller, + struct sln_mixture** out_mixture) { struct sln_mixture* mixture = NULL; res_T res = RES_OK; - ASSERT(sln && out_mixture); + ASSERT(sln && caller && out_mixture); mixture = MEM_CALLOC(sln->allocator, 1, sizeof(struct sln_mixture)); if(!mixture) { log_err(sln, "%s: could not allocate the mixture data structure.\n", - FUNC_NAME); + caller); res = RES_MEM_ERR; goto error; } @@ -383,7 +386,7 @@ sln_mixture_create if(!sln || !out_mixture) { res = RES_BAD_ARG; goto error; } res = check_sln_mixture_create_args(sln, FUNC_NAME, args); if(res != RES_OK) goto error; - res = create_mixture(sln, &mixture); + res = create_mixture(sln, FUNC_NAME, &mixture); if(res != RES_OK) goto error; #define CALL(Func) { if(RES_OK != (res = Func)) goto error; } (void)0 @@ -418,7 +421,7 @@ sln_mixture_create_from_stream goto error; } - res = create_mixture(sln, &mixture); + res = create_mixture(sln, FUNC_NAME, &mixture); if(res != RES_OK) goto error; #define READ(Var, Nb) { \