Use standard library includes instead of C includes when possible

This commit is contained in:
Charles Dang 2016-11-30 11:48:10 +11:00
parent f6c8e3ef18
commit 9baabccf91
23 changed files with 25 additions and 33 deletions

View file

@ -49,8 +49,8 @@
#if defined(BENCHMARK) || defined(CHECK)
#include <chrono>
#include <stdio.h>
#include <stdlib.h>
#include <cstdio>
#include <cstdlib>
// Set some default values so this file can stand alone.
namespace game_config {

View file

@ -27,7 +27,7 @@
#include <map>
#include <string>
#include <vector>
#include <stdint.h>
#include <cstdint>
/* Convert comma separated string into rgb values.
* Return false and empty result on error.

View file

@ -28,7 +28,7 @@
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/member.hpp>
#include <stdlib.h>
#include <cstdlib>
#include <string>
#pragma GCC diagnostic ignored "-Wold-style-cast"

View file

@ -20,7 +20,7 @@
#ifndef FILESYSTEM_HPP_INCLUDED
#define FILESYSTEM_HPP_INCLUDED
#include <time.h>
#include <ctime>
#include <iosfwd>
#include <string>

View file

@ -17,7 +17,7 @@
#include <cassert>
#include <cmath>
#include <iostream>
#include <string.h>
#include <cstring>
#include "formatter.hpp"
#include "formula/callable.hpp"

View file

@ -22,7 +22,7 @@ class color_range;
#include <vector>
#include <map>
#include <stdint.h>
#include <cstdint>
//basic game configuration information is here.
namespace game_config

View file

@ -26,7 +26,7 @@
#include "tod_manager.hpp"
#include "wesnothd_connection.hpp"
#include <stdlib.h>
#include <cstdlib>
#include <ctime>
static lg::log_domain log_config("config");

View file

@ -40,7 +40,7 @@
#include "video.hpp" // for CVideo, resize_lock
#include "widgets/button.hpp" // for button
#include <assert.h> // for assert
#include <cassert> // for assert
#include <algorithm> // for min
#include <ostream> // for basic_ostream, operator<<, etc
#include <vector> // for vector, vector<>::iterator

View file

@ -45,7 +45,7 @@
#include "serialization/unicode.hpp" // for iterator
#include "sdl/color.hpp"
#include <assert.h> // for assert
#include <cassert> // for assert
#include <algorithm> // for sort, find, transform, etc
#include <iostream> // for operator<<, basic_ostream, etc
#include <iterator> // for back_insert_iterator, etc

View file

@ -40,22 +40,15 @@ documentation and/or software.
*/
#include "md5.hpp"
#include <assert.h>
#include <cassert>
#include <iostream>
#include <string.h> // Edit: needed for strlen() (strings.h should
#include <cstring> // Edit: needed for strlen() (strings.h should
// include it but apparently does not for me)
#include "global.hpp"
// MD5 simple initialization method
MD5::MD5()

View file

@ -17,7 +17,7 @@
#include <cassert>
#include <stdlib.h>
#include <cstdlib>
#include <random>
#include <boost/random/random_device.hpp>

View file

@ -19,7 +19,7 @@
#include "units/types.hpp"
#include <string>
#include <string.h>
#include <cstring>
#include "lua/lua.h"
#include "lua/lauxlib.h"

View file

@ -20,7 +20,7 @@
#include "units/types.hpp"
#include <string>
#include <string.h>
#include <cstring>
#include "lua/lua.h"
#include "lua/lauxlib.h"

View file

@ -18,7 +18,7 @@
#include "config_assign.hpp"
#include <assert.h>
#include <cassert>
#include <utility>
#include "utils/functional.hpp"

View file

@ -16,7 +16,7 @@
#include "scripting/application_lua_kernel.hpp"
#include "scripting/plugins/context.hpp"
#include <assert.h>
#include <cassert>
#include <stdexcept>
#include <string>
#include <vector>

View file

@ -19,7 +19,7 @@
#include "log.hpp"
#include "config.hpp"
#include <stdlib.h>
#include <cstdlib>
#include <sstream>
static lg::log_domain log_mp_user_handler("mp_user_handler");

View file

@ -21,7 +21,7 @@
#include <map>
#include <string>
#include <time.h>
#include <ctime>
#include "server/simple_wml.hpp"

View file

@ -15,7 +15,7 @@
#ifndef SIMPLE_WML_HPP_INCLUDED
#define SIMPLE_WML_HPP_INCLUDED
#include <string.h>
#include <cstring>
#include <cstddef>
#include <iosfwd>

View file

@ -39,7 +39,7 @@
#include "whiteboard/manager.hpp"
#include <cassert>
#include <stdlib.h>
#include <cstdlib>
#include <sstream>
#include <iomanip>
static lg::log_domain log_replay("replay");

View file

@ -25,7 +25,7 @@
#include <set>
#include <stdint.h>
#include <cstdint>
#include <boost/dynamic_bitset.hpp>
class game_data;

View file

@ -19,7 +19,7 @@
#include <vector>
#include <map>
#include <stdint.h>
#include <cstdint>
#include <boost/bimap.hpp>
#include <boost/bimap/set_of.hpp>
#include <boost/bimap/multiset_of.hpp>

View file

@ -27,8 +27,7 @@
#include <fstream>
#include <string>
#include <string.h>
#include <cstring>
std::string version = "0.6.0";

View file

@ -34,7 +34,7 @@
#include <map>
#include <algorithm>
#include <assert.h>
#include <cassert>
static lg::log_domain log_display("display");
#define LOG_DP LOG_STREAM(info, log_display)