diff --git a/common/general.h b/common/general.h index c9253267..3458e47f 100644 --- a/common/general.h +++ b/common/general.h @@ -1,9 +1,17 @@ #ifndef H_COMMON_GENERAL #define H_COMMON_GENERAL -int max(int first, int second) +#ifdef __cplusplus +extern "C" { +#endif + +inline int max(int first, int second) { return (first < second) ? second : first; } +#ifdef __cplusplus +} +#endif + #endif