This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 14c24da39e8d293f98aae1e4ba72be6c4069417f (commit) from 8a0c954a8e79f88f06cfc99f7a29d3a1558b21d6 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/14c24da39e8d293f98aae1e4ba72be6c40694...
commit 14c24da39e8d293f98aae1e4ba72be6c4069417f Author: Cyril Hrubis metan@ucw.cz Date: Sat Dec 8 20:44:30 2012 +0100
core: GP_Common.h: Remove the C++ part.
The C++ implementation of common gfxprim macros is not needed at all because these problems have different solutions in C++. Hide them only, which is sufficient for using GP.h from C++ code.
diff --git a/include/core/GP_Common.h b/include/core/GP_Common.h index ee5907c..a1e8d14 100644 --- a/include/core/GP_Common.h +++ b/include/core/GP_Common.h @@ -16,10 +16,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, * * Boston, MA 02110-1301 USA * * * - * Copyright (C) 2009-2010 Jiri "BlueBear" Dluhos * + * Copyright (C) 2009-2012 Jiri "BlueBear" Dluhos * * jiri.bluebear.dluhos@gmail.com * * * - * Copyright (C) 2009-2011 Cyril Hrubis metan@ucw.cz * + * Copyright (C) 2009-2012 Cyril Hrubis metan@ucw.cz * * * *****************************************************************************/
@@ -31,33 +31,7 @@ #include <stdlib.h> #include <unistd.h>
-#ifdef __cplusplus - -/*-------------------------------------------------------------------------*/ -/* C++-specific code */ -/*-------------------------------------------------------------------------*/ - -#include <algorithm> -#include <cmath> - -/* use STL algorithms when we already have them */ -#define GP_MIN(a, b) std::min(a, b) -#define GP_MAX(a, b) std::max(a, b) -#define GP_SWAP(a, b) std::swap(a, b) -#define GP_ABS(a) std::abs(a) - -/* C++ uses templates instead of typeof */ -template <typename t> -int GP_SIGN(t x) -{ - return (x > 0) ? 1 : ((x < 0) ? -1 : 0); -} - -#else /* __cplusplus */ - -/*-------------------------------------------------------------------------*/ -/* plain C-specific code */ -/*-------------------------------------------------------------------------*/ +#ifndef __cplusplus
/* * Returns a minimum of the two numbers. @@ -102,10 +76,6 @@ int GP_SIGN(t x) (_a > 0) ? 1 : ((_a < 0) ? -1 : 0); })
-/*-------------------------------------------------------------------------*/ -/* end of C/C++-specific code */ -/*-------------------------------------------------------------------------*/ - #endif /* __cplusplus */
/* @@ -194,4 +164,4 @@ void SWIG_exception(const char *msg); #define GP_CHECK(check_cond_, ...) GP_GENERAL_CHECK(check_cond_, "check failed: ", ##__VA_ARGS__);
-#endif /* CORE_GP_COMMON_H */ No newline at end of file +#endif /* CORE_GP_COMMON_H */
-----------------------------------------------------------------------
Summary of changes: include/core/GP_Common.h | 38 ++++---------------------------------- 1 files changed, 4 insertions(+), 34 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.