From e6f1d682e73f9b42d6c34042e7e7b5bc0962f7d0 Mon Sep 17 00:00:00 2001 From: Iaroslav Erokhin Date: Fri, 15 May 2026 09:37:03 +0200 Subject: [PATCH] move _IMPLEMENTATION outside of _H This allows the user to first include the header file in multiple places and only then add it with the implementation. --- src/nanosvg.h | 4 ++-- src/nanosvgrast.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nanosvg.h b/src/nanosvg.h index f5884c8..de67e91 100644 --- a/src/nanosvg.h +++ b/src/nanosvg.h @@ -192,6 +192,8 @@ void nsvgDelete(NSVGimage* image); #endif #endif +#endif // NANOSVG_H + #ifdef NANOSVG_IMPLEMENTATION #include @@ -3128,5 +3130,3 @@ void nsvgDelete(NSVGimage* image) } #endif // NANOSVG_IMPLEMENTATION - -#endif // NANOSVG_H diff --git a/src/nanosvgrast.h b/src/nanosvgrast.h index ba512c7..d7c9582 100644 --- a/src/nanosvgrast.h +++ b/src/nanosvgrast.h @@ -74,6 +74,8 @@ void nsvgDeleteRasterizer(NSVGrasterizer*); #endif #endif +#endif // NANOSVGRAST_H + #ifdef NANOSVGRAST_IMPLEMENTATION #include @@ -1468,5 +1470,3 @@ void nsvgRasterize(NSVGrasterizer* r, } #endif // NANOSVGRAST_IMPLEMENTATION - -#endif // NANOSVGRAST_H