Permalink
Browse files

Use C++ includes (#308)

Replaces stdio.h, stdlib.h, string.h, math.h, time.h, limits.h and othters with their C++ equivalents.
  • Loading branch information...
wolfy1339 authored and jacob1 committed Jul 18, 2016
1 parent eafd811 commit b65e94900e886005649e7f3fe04cce18655bb551
@@ -5,7 +5,7 @@
#include <iostream>
#include <iterator>
#include <zlib.h>
#include <stdio.h>
#include <cstdio>
#include "Format.h"
#include "graphics/Graphics.h"
@@ -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"
@@ -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>
@@ -7,7 +7,7 @@
#include <windows.h>
#else
#include <unistd.h>
#include <time.h>
#include <ctime>
#include <sys/time.h>
#endif
#ifdef MACOSX
@@ -1,6 +1,6 @@
#if defined(RENDERER)
#include <time.h>
#include <ctime>
#include <iostream>
#include <sstream>
#include <string>
@@ -2,7 +2,7 @@
#include <map>
#include <string>
#include <time.h>
#include <ctime>
#ifdef SDL_INC
#include "SDL/SDL.h"
#else
@@ -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>
@@ -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"
@@ -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)
@@ -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>
@@ -1,4 +1,4 @@
#include <stdlib.h>
#include <cstdlib>
#include "Download.h"
#include "DownloadManager.h"
#include "HTTP.h"
@@ -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"
@@ -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>
@@ -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)
@@ -4,7 +4,7 @@
#include <list>
#include <vector>
#include <string>
#include <stdlib.h>
#include <cstdlib>
#include <iostream>
class GameSave;
@@ -1,6 +1,6 @@
#include <iostream>
#include <typeinfo>
#include <time.h>
#include <ctime>
#include "ImageRequest.h"
#include "graphics/Graphics.h"
#include "client/HTTP.h"
@@ -2,7 +2,7 @@
#include <iostream>
#include <typeinfo>
#include <sstream>
#include <time.h>
#include <ctime>
#include "RequestBroker.h"
#include "RequestListener.h"
#include "ThumbRenderRequest.h"
@@ -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)
{
@@ -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)
{
@@ -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"
@@ -1,4 +1,4 @@
#include <stdio.h>
#include <cstdio>
#ifdef WIN
#include <direct.h>
#define getcwd _getcwd
@@ -1,6 +1,6 @@
#include <iostream>
#include <string>
#include <string.h>
#include <cstring>
#if !defined(WIN) || defined(__GNUC__)
#include <strings.h>
#endif
@@ -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"
@@ -2,7 +2,7 @@
#import <jawt_md.h>
#include <windows.h>
#include <assert.h>
#include <cassert>
#include <gl/gl.h>
int defaultPixelFormat(PIXELFORMATDESCRIPTOR* pfd);
@@ -1,6 +1,6 @@
#if defined(USE_JNI)
#include <time.h>
#include <ctime>
#include <iostream>
#include <sstream>
#include <string>
@@ -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

0 comments on commit b65e949

Please sign in to comment.