Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
Consistently include C headers by their C++ wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Feb 25, 2024
1 parent 44a368e commit 1e89db1
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion include/IImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "position2d.h"
#include "rect.h"
#include "SColor.h"
#include <string.h>
#include <cstring>

namespace irr
{
Expand Down
4 changes: 2 additions & 2 deletions include/irrMath.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

#include "irrTypes.h"
#include <cmath>
#include <float.h>
#include <cfloat>
#include <cstdlib> // for abs() etc.
#include <limits.h> // For INT_MAX / UINT_MAX
#include <climits> // For INT_MAX / UINT_MAX
#include <type_traits>

namespace irr
Expand Down
2 changes: 1 addition & 1 deletion include/irrTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#pragma once

#include <stdint.h>
#include <cstdint>

namespace irr
{
Expand Down
8 changes: 4 additions & 4 deletions source/Irrlicht/CFileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
#include <io.h> // for _access
#include <tchar.h>
#elif (defined(_IRR_POSIX_API_) || defined(_IRR_OSX_PLATFORM_) || defined(_IRR_ANDROID_PLATFORM_))
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
Expand Down
2 changes: 1 addition & 1 deletion source/Irrlicht/CImageLoaderJPG.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "IImageLoader.h"

#include <stdio.h> // required for jpeglib.h
#include <cstdio> // required for jpeglib.h
#include <jpeglib.h> // use system lib
#include <setjmp.h>

Expand Down
2 changes: 1 addition & 1 deletion source/Irrlicht/CImageWriterJPG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "irrString.h"
#include "os.h"

#include <stdio.h> // required for jpeglib.h
#include <cstdio> // required for jpeglib.h
extern "C"
{
#include <jpeglib.h>
Expand Down
8 changes: 4 additions & 4 deletions source/Irrlicht/CIrrDeviceLinux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

#ifdef _IRR_COMPILE_WITH_X11_DEVICE_

#include <stdio.h>
#include <stdlib.h>
#include <cstdio>
#include <cstdlib>
#include <sys/utsname.h>
#include <time.h>
#include <locale.h>
#include <ctime>
#include <clocale>
#include "IEventReceiver.h"
#include "ISceneManager.h"
#include "IGUIElement.h"
Expand Down
4 changes: 2 additions & 2 deletions source/Irrlicht/CIrrDeviceSDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#include "irrString.h"
#include "Keycodes.h"
#include "COSOperator.h"
#include <stdio.h>
#include <stdlib.h>
#include <cstdio>
#include <cstdlib>
#include "SIrrCreationParameters.h"
#include <SDL_video.h>

Expand Down
2 changes: 1 addition & 1 deletion source/Irrlicht/COSOperator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifdef _IRR_WINDOWS_API_
#include <windows.h>
#else
#include <string.h>
#include <cstring>
#include <unistd.h>
#ifndef _IRR_ANDROID_PLATFORM_
#include <sys/types.h>
Expand Down
2 changes: 1 addition & 1 deletion source/Irrlicht/CReadFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#pragma once

#include <stdio.h>
#include <cstdio>
#include "IReadFile.h"
#include "irrString.h"

Expand Down
2 changes: 1 addition & 1 deletion source/Irrlicht/CWriteFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h

#include "CWriteFile.h"
#include <stdio.h>
#include <cstdio>

namespace irr
{
Expand Down
10 changes: 5 additions & 5 deletions source/Irrlicht/os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define bswap_32(X) SDL_Swap32(X)
#define bswap_64(X) SDL_Swap64(X)
#elif defined(_IRR_WINDOWS_API_) && defined(_MSC_VER)
#include <stdlib.h>
#include <cstdlib>
#define bswap_16(X) _byteswap_ushort(X)
#define bswap_32(X) _byteswap_ulong(X)
#define bswap_64(X) _byteswap_uint64(X)
Expand Down Expand Up @@ -60,7 +60,7 @@ namespace os

#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <time.h>
#include <ctime>

namespace irr
{
Expand Down Expand Up @@ -171,7 +171,7 @@ namespace os
// ----------------------------------------------------------------

#include <emscripten.h>
#include <time.h>
#include <ctime>
#include <sys/time.h>

namespace irr
Expand Down Expand Up @@ -222,8 +222,8 @@ namespace os
// linux/ansi version
// ----------------------------------------------------------------

#include <stdio.h>
#include <time.h>
#include <cstdio>
#include <ctime>
#include <sys/time.h>

namespace irr
Expand Down

0 comments on commit 1e89db1

Please sign in to comment.