Use standard library includes instead of C includes when possible
This commit is contained in:
parent
f6c8e3ef18
commit
9baabccf91
23 changed files with 25 additions and 33 deletions
|
@ -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 {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#ifndef FILESYSTEM_HPP_INCLUDED
|
||||
#define FILESYSTEM_HPP_INCLUDED
|
||||
|
||||
#include <time.h>
|
||||
#include <ctime>
|
||||
|
||||
#include <iosfwd>
|
||||
#include <string>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <string.h>
|
||||
#include <cstring>
|
||||
|
||||
#include "formatter.hpp"
|
||||
#include "formula/callable.hpp"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
11
src/md5.cpp
11
src/md5.cpp
|
@ -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()
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
|
||||
#include <cassert>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
#include <random>
|
||||
#include <boost/random/random_device.hpp>
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "units/types.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <cstring>
|
||||
|
||||
#include "lua/lua.h"
|
||||
#include "lua/lauxlib.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "units/types.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <cstring>
|
||||
|
||||
#include "lua/lua.h"
|
||||
#include "lua/lauxlib.h"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "config_assign.hpp"
|
||||
|
||||
#include <assert.h>
|
||||
#include <cassert>
|
||||
#include <utility>
|
||||
#include "utils/functional.hpp"
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <time.h>
|
||||
#include <ctime>
|
||||
|
||||
#include "server/simple_wml.hpp"
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#ifndef SIMPLE_WML_HPP_INCLUDED
|
||||
#define SIMPLE_WML_HPP_INCLUDED
|
||||
|
||||
#include <string.h>
|
||||
#include <cstring>
|
||||
|
||||
#include <cstddef>
|
||||
#include <iosfwd>
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include <set>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <cstdint>
|
||||
#include <boost/dynamic_bitset.hpp>
|
||||
|
||||
class game_data;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -27,8 +27,7 @@
|
|||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
std::string version = "0.6.0";
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue