--- a/sources/basics.h Wed May 27 21:44:42 2015 +0300 +++ b/sources/basics.h Thu Jul 23 00:16:47 2015 +0300 @@ -31,26 +31,23 @@ #pragma once #include <algorithm> #include <functional> +#include <cstdio> +#include <cstdlib> +#include <cstring> +#include <cctype> -#ifndef _MSC_VER +#if !defined(_MSC_VER) && !defined(__cdecl) # define __cdecl #endif -#define FUNCTION auto -#define STATIC -#define METHOD auto #define MACRO_TO_STRING_2(A) #A #define MACRO_TO_STRING(A) MACRO_TO_STRING_2(A) class String; - using std::swap; using std::min; using std::max; -template<typename Signature> -using Function = std::function<Signature>; - // ------------------------------------------------------------------------------------------------- // enum Color @@ -87,12 +84,8 @@ // ------------------------------------------------------------------------------------------------- // -FUNCTION print_to_console (String a) -> void; - -// ------------------------------------------------------------------------------------------------- -// -template<typename T> inline FUNCTION -clamp (T a, T b, T c) -> T +template<typename T> +inline T clamp (T a, T b, T c) { return (a < b) ? b : (a > c) ? c : a; }