generallib/general/inc/utils.h

42 lines
592 B
C
Raw Normal View History

2019-12-21 10:50:15 +00:00
//
// Created by 29019 on 2019/5/2.
//
#ifndef CUTILS_UTILS_H
#define CUTILS_UTILS_H
#include "utils.h"
#include <string>
#include "debug.h"
#include <sys/types.h>
2019-12-21 10:50:15 +00:00
using namespace std;
2019-12-21 10:50:15 +00:00
typedef enum {
ENV_WINDOWS = 1,
ENV_LINUX,
2020-08-30 07:13:54 +00:00
ENV_UNIX,
ENV_NONE,
}ENV_SYS;
typedef enum{
GCC = 1,
CLANG = 2,
2020-08-30 07:13:54 +00:00
CL = 3,
UNKNOWN
}ENV_COMPILER;
inline ENV_SYS CurrentEnvSys();
inline ENV_COMPILER CurrentEnvCompiler();
2019-12-21 10:50:15 +00:00
#define RELEASE_MEMORY(x) \
if(nullptr == x) \
{ \
delete(x); \
x = nullptr;\
}
string itos(int x);
2020-04-01 13:44:44 +00:00
2019-12-21 10:50:15 +00:00
#endif //CUTILS_UTILS_H