stdutil: Modernize code
This commit is contained in:
+4
-8
@@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
#include "stdutil.hpp"
|
#include "stdutil.hpp"
|
||||||
|
|
||||||
#include <math.h>
|
#include <cmath>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
#include <windows.h>
|
|
||||||
|
#include <Windows.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@@ -171,10 +171,6 @@ void _cdecl operator delete[](void* q, const char* file, int line)
|
|||||||
op_delete(q);
|
op_delete(q);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define trackmem
|
|
||||||
#define checkmem
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+8
-10
@@ -1,16 +1,16 @@
|
|||||||
|
#pragma once
|
||||||
#ifndef STDUTIL_H
|
|
||||||
#define STDUTIL_H
|
|
||||||
|
|
||||||
#pragma warning(disable : 4786)
|
|
||||||
|
|
||||||
#include "config.hpp"
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include <config.hpp>
|
||||||
|
|
||||||
|
#ifdef MEMDEBUG
|
||||||
void trackmem(bool enable);
|
void trackmem(bool enable);
|
||||||
void checkmem(std::ostream& out);
|
void checkmem(std::ostream& out);
|
||||||
|
#else
|
||||||
|
static inline void trackmem(bool){};
|
||||||
|
static inline void checkmem(std::ostream&){};
|
||||||
|
#endif
|
||||||
|
|
||||||
//some stuff that should be in std libs
|
//some stuff that should be in std libs
|
||||||
int atoi(const std::string& s);
|
int atoi(const std::string& s);
|
||||||
@@ -132,5 +132,3 @@ class pool {
|
|||||||
p->~T();
|
p->~T();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|||||||
Reference in New Issue
Block a user