Use C++ includes (#308)

Replaces stdio.h, stdlib.h, string.h, math.h, time.h, limits.h and othters with their C++ equivalents.
This commit is contained in:
wolfy1339 2016-07-17 23:37:24 -04:00 committed by jacob1
parent eafd8115b0
commit b65e94900e
26 changed files with 50 additions and 50 deletions

View File

@ -5,7 +5,7 @@
#include <iostream>
#include <iterator>
#include <zlib.h>
#include <stdio.h>
#include <cstdio>
#include "Format.h"
#include "graphics/Graphics.h"

View File

@ -1,6 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <sys/types.h>
#include <cmath>
#include "Config.h"

View File

@ -1,7 +1,7 @@
#ifndef UTILS_H
#define UTILS_H
#include <stdio.h>
#include <stdlib.h>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <sstream>
#include <vector>

View File

@ -7,7 +7,7 @@
#include <windows.h>
#else
#include <unistd.h>
#include <time.h>
#include <ctime>
#include <sys/time.h>
#endif
#ifdef MACOSX

View File

@ -1,6 +1,6 @@
#if defined(RENDERER)
#include <time.h>
#include <ctime>
#include <iostream>
#include <sstream>
#include <string>

View File

@ -2,7 +2,7 @@
#include <map>
#include <string>
#include <time.h>
#include <ctime>
#ifdef SDL_INC
#include "SDL/SDL.h"
#else

View File

@ -1,12 +1,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <cstdio>
#include <cstdlib>
#ifndef WIN
#include <sys/param.h>
#endif
#if !defined(MACOSX) && !defined(BSD)
#include <malloc.h>
#endif
#include <string.h>
#include <cstring>
#ifdef WIN
#include <windows.h>

View File

@ -15,11 +15,11 @@
* limitations under the License.
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <time.h>
#include <limits.h>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <ctime>
#include <climits>
#include "BSON.h"

View File

@ -21,11 +21,11 @@
#ifndef _BSON_H_
#define _BSON_H_
#include <time.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <ctime>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <cstdarg>
#include "Config.h"
#if defined(LIN) || defined(USE_STDINT)

View File

@ -1,12 +1,12 @@
#include <stdlib.h>
#include <cstdlib>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <iomanip>
#include <time.h>
#include <stdio.h>
#include <ctime>
#include <cstdio>
#include <deque>
#include <fstream>
#include <dirent.h>

View File

@ -1,4 +1,4 @@
#include <stdlib.h>
#include <cstdlib>
#include "Download.h"
#include "DownloadManager.h"
#include "HTTP.h"

View File

@ -1,7 +1,7 @@
#ifndef DOWNLOADMANAGER_H
#define DOWNLOADMANAGER_H
#include "common/tpt-thread.h"
#include <time.h>
#include <ctime>
#include <vector>
#include "common/Singleton.h"

View File

@ -22,16 +22,16 @@
#include <string>
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#ifndef WIN
#include <sys/param.h>
#endif
#if !defined(MACOSX) && !defined(BSD)
#include <malloc.h>
#endif
#include <time.h>
#include <ctime>
#ifdef WIN
#define _WIN32_WINNT 0x0501
//#include <iphlpapi.h>

View File

@ -1,5 +1,5 @@
// based on public-domain code from Colin Plumb (1993)
#include <string.h>
#include <cstring>
#include "MD5.h"
static unsigned getu32(const unsigned char *addr)

View File

@ -4,7 +4,7 @@
#include <list>
#include <vector>
#include <string>
#include <stdlib.h>
#include <cstdlib>
#include <iostream>
class GameSave;

View File

@ -1,6 +1,6 @@
#include <iostream>
#include <typeinfo>
#include <time.h>
#include <ctime>
#include "ImageRequest.h"
#include "graphics/Graphics.h"
#include "client/HTTP.h"

View File

@ -2,7 +2,7 @@
#include <iostream>
#include <typeinfo>
#include <sstream>
#include <time.h>
#include <ctime>
#include "RequestBroker.h"
#include "RequestListener.h"
#include "ThumbRenderRequest.h"

View File

@ -1,5 +1,5 @@
#include "../data/font.h"
#include <math.h>
#include <cmath>
int PIXELMETHODS_CLASS::drawtext_outline(int x, int y, const char *s, int r, int g, int b, int a)
{

View File

@ -1,5 +1,5 @@
#include "font.h"
#include <math.h>
#include <cmath>
int PIXELMETHODS_CLASS::drawtext_outline(int x, int y, const char *s, int r, int g, int b, int a)
{

View File

@ -1,8 +1,8 @@
#include <cmath>
#include <iostream>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <cstdio>
#include <cstdlib>
#include "Config.h"
#include "Renderer.h"
#include "Graphics.h"

View File

@ -1,4 +1,4 @@
#include <stdio.h>
#include <cstdio>
#ifdef WIN
#include <direct.h>
#define getcwd _getcwd

View File

@ -1,6 +1,6 @@
#include <iostream>
#include <string>
#include <string.h>
#include <cstring>
#if !defined(WIN) || defined(__GNUC__)
#include <strings.h>
#endif

View File

@ -2,11 +2,11 @@
#include <iostream>
#include <string>
#include <deque>
#include <string.h>
#include <cstring>
#ifdef MACOSX
#include <strings.h>
#endif
#include <stdlib.h>
#include <cstdlib>
#include "TPTScriptInterface.h"
#include "gui/game/GameModel.h"
#include "simulation/Air.h"

View File

@ -2,7 +2,7 @@
#import <jawt_md.h>
#include <windows.h>
#include <assert.h>
#include <cassert>
#include <gl/gl.h>
int defaultPixelFormat(PIXELFORMATDESCRIPTOR* pfd);

View File

@ -1,6 +1,6 @@
#if defined(USE_JNI)
#include <time.h>
#include <ctime>
#include <iostream>
#include <sstream>
#include <string>

View File

@ -12,11 +12,11 @@
// Dec. 31, 2008: v2.2: Bit more cleanup, released as public domain.
// June 4, 2012: v2.21: Switched to unlicense.org, integrated GCC fixes supplied by Peter Nagy <petern@crytek.com>, Anteru at anteru.net, and clay@coge.net,
// added Codeblocks project (for testing with MinGW and GCC), VS2008 static code analysis pass.
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include <assert.h>
#include <string.h>
#include <cstdlib>
#include <cmath>
#include <cfloat>
#include <cassert>
#include <cstring>
#include "resampler.h"
#define resampler_assert assert