C++ modernize: Pragma once (#6264)

* Migrate cpp headers to pragma once
nephele-craftmethods
Loïc Blot 5 years ago committed by GitHub
parent c738d1eeab
commit 921151d97a
  1. 6
      src/activeobject.h
  2. 5
      src/ban.h
  3. 5
      src/camera.h
  4. 5
      src/cavegen.h
  5. 6
      src/chat.h
  6. 5
      src/chat_interface.h
  7. 5
      src/chatmessage.h
  8. 5
      src/client.h
  9. 5
      src/client/clientlauncher.h
  10. 5
      src/client/inputhandler.h
  11. 5
      src/client/joystick_controller.h
  12. 5
      src/client/keys.h
  13. 4
      src/client/tile.h
  14. 5
      src/clientenvironment.h
  15. 6
      src/clientiface.h
  16. 6
      src/clientmap.h
  17. 5
      src/clientmedia.h
  18. 5
      src/clientobject.h
  19. 5
      src/clientsimpleobject.h
  20. 5
      src/cloudparams.h
  21. 7
      src/clouds.h
  22. 6
      src/cmake_config.h.in
  23. 6
      src/cmake_config_githash.h.in
  24. 7
      src/collision.h
  25. 5
      src/config.h
  26. 5
      src/constants.h
  27. 6
      src/content_cao.h
  28. 6
      src/content_cso.h
  29. 5
      src/content_mapblock.h
  30. 5
      src/content_mapnode.h
  31. 6
      src/content_nodemeta.h
  32. 5
      src/content_sao.h
  33. 9
      src/convert_json.h
  34. 6
      src/craftdef.h
  35. 5
      src/database-dummy.h
  36. 5
      src/database-files.h
  37. 5
      src/database-leveldb.h
  38. 6
      src/database-postgresql.h
  39. 5
      src/database-redis.h
  40. 5
      src/database-sqlite3.h
  41. 5
      src/database.h
  42. 6
      src/daynightratio.h
  43. 7
      src/debug.h
  44. 5
      src/defaultsettings.h
  45. 5
      src/dungeongen.h
  46. 5
      src/emerge.h
  47. 5
      src/environment.h
  48. 6
      src/event.h
  49. 6
      src/event_manager.h
  50. 6
      src/exceptions.h
  51. 5
      src/face_position_cache.h
  52. 5
      src/filecache.h
  53. 6
      src/filesys.h
  54. 6
      src/fontengine.h
  55. 5
      src/game.h
  56. 6
      src/gamedef.h
  57. 5
      src/gameparams.h
  58. 6
      src/genericobject.h
  59. 5
      src/gettext.h
  60. 5
      src/gettime.h
  61. 7
      src/guiChatConsole.h
  62. 5
      src/guiEngine.h
  63. 6
      src/guiFormSpecMenu.h
  64. 5
      src/guiKeyChangeMenu.h
  65. 6
      src/guiMainMenu.h
  66. 5
      src/guiPasswordChange.h
  67. 5
      src/guiPathSelectMenu.h
  68. 7
      src/guiTable.h
  69. 6
      src/guiVolumeChange.h
  70. 6
      src/guiscalingfilter.h
  71. 5
      src/httpfetch.h
  72. 5
      src/hud.h
  73. 5
      src/imagefilters.h
  74. 4
      src/intlGUIEditBox.h
  75. 5
      src/inventory.h
  76. 6
      src/inventorymanager.h
  77. 5
      src/irr_aabb3d.h
  78. 5
      src/irr_v2d.h
  79. 5
      src/irr_v3d.h
  80. 5
      src/irrlicht_changes/CGUITTFont.h
  81. 5
      src/irrlicht_changes/irrUString.h
  82. 5
      src/irrlicht_changes/static_text.h
  83. 5
      src/irrlichttypes.h
  84. 5
      src/irrlichttypes_bloated.h
  85. 5
      src/irrlichttypes_extrabloated.h
  86. 5
      src/itemdef.h
  87. 5
      src/itemgroup.h
  88. 5
      src/itemstackmetadata.h
  89. 5
      src/keycode.h
  90. 5
      src/light.h
  91. 5
      src/localplayer.h
  92. 6
      src/log.h
  93. 6
      src/mainmenumanager.h
  94. 5
      src/map.h
  95. 5
      src/map_settings_manager.h
  96. 5
      src/mapblock.h
  97. 6
      src/mapblock_mesh.h
  98. 5
      src/mapgen.h
  99. 5
      src/mapgen_carpathian.h
  100. 5
      src/mapgen_flat.h
  101. Some files were not shown because too many files have changed in this diff Show More

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef ACTIVEOBJECT_HEADER
#define ACTIVEOBJECT_HEADER
#pragma once
#include "irr_aabb3d.h"
#include <string>
@ -102,6 +101,3 @@ public:
protected:
u16 m_id; // 0 is invalid, "no id"
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef BAN_HEADER
#define BAN_HEADER
#pragma once
#include "util/string.h"
#include "threading/thread.h"
@ -48,5 +47,3 @@ private:
StringMap m_ips;
bool m_modified = false;
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CAMERA_HEADER
#define CAMERA_HEADER
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "inventory.h"
@ -232,5 +231,3 @@ private:
std::list<Nametag *> m_nametags;
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CAVEGEN_HEADER
#define CAVEGEN_HEADER
#pragma once
#define VMANIP_FLAG_CAVE VOXELFLAG_CHECKED1
@ -241,5 +240,3 @@ private:
inline s16 getSurfaceFromHeightmap(v3s16 p);
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CHAT_HEADER
#define CHAT_HEADER
#pragma once
#include <string>
#include <vector>
@ -287,6 +286,3 @@ private:
ChatBuffer m_recent_buffer;
ChatPrompt m_prompt;
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CHAT_INTERFACE_H
#define CHAT_INTERFACE_H
#pragma once
#include "util/container.h"
#include <string>
@ -78,5 +77,3 @@ struct ChatInterface {
MutexedQueue<ChatEvent *> command_queue; // chat backend --> server
MutexedQueue<ChatEvent *> outgoing_queue; // server --> chat backend
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MT_CHATMESSAGE_H
#define MT_CHATMESSAGE_H
#pragma once
#include <string>
#include <ctime>
@ -47,5 +46,3 @@ struct ChatMessage
std::wstring sender = L"";
std::time_t timestamp = std::time(0);
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CLIENT_HEADER
#define CLIENT_HEADER
#pragma once
#include "network/connection.h"
#include "clientenvironment.h"
@ -718,5 +717,3 @@ private:
u64 m_csm_flavour_limits = CSMFlavourLimit::CSM_FL_NONE;
u32 m_csm_noderange_limit = 8;
};
#endif // !CLIENT_HEADER

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __CLIENT_LAUNCHER_H__
#define __CLIENT_LAUNCHER_H__
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "client/inputhandler.h"
@ -69,5 +68,3 @@ protected:
std::string current_address = "does-not-exist";
int current_port = 0;
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef INPUT_HANDLER_H
#define INPUT_HANDLER_H
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "joystick_controller.h"
@ -393,5 +392,3 @@ private:
bool leftreleased = false;
bool rightreleased = false;
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef JOYSTICK_HEADER
#define JOYSTICK_HEADER
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "keys.h"
@ -168,5 +167,3 @@ private:
std::bitset<KeyType::INTERNAL_ENUM_COUNT> m_past_pressed_keys;
std::bitset<KeyType::INTERNAL_ENUM_COUNT> m_past_released_keys;
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef KEYS_HEADER
#define KEYS_HEADER
#pragma once
#include <list>
@ -114,5 +113,3 @@ public:
};
typedef KeyType::T GameKeyType;
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef TILE_HEADER
#define TILE_HEADER
#pragma once
#include "irrlichttypes.h"
#include "irr_v3d.h"
@ -330,4 +329,3 @@ struct TileSpec
//! The first is base texture, the second is overlay.
TileLayer layers[MAX_TILE_LAYERS];
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CLIENT_ENVIRONMENT_HEADER
#define CLIENT_ENVIRONMENT_HEADER
#pragma once
#include <ISceneManager.h>
#include "environment.h"
@ -158,5 +157,3 @@ private:
std::list<std::string> m_player_names;
v3s16 m_camera_offset;
};
#endif

@ -16,8 +16,8 @@ You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef _CLIENTIFACE_H_
#define _CLIENTIFACE_H_
#pragma once
#include "irr_v3d.h" // for irrlicht datatypes
@ -500,5 +500,3 @@ private:
static const char *statenames[];
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CLIENTMAP_HEADER
#define CLIENTMAP_HEADER
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "map.h"
@ -137,6 +136,3 @@ private:
bool m_cache_bilinear_filter;
bool m_cache_anistropic_filter;
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CLIENTMEDIA_HEADER
#define CLIENTMEDIA_HEADER
#pragma once
#include "irrlichttypes.h"
#include "filecache.h"
@ -147,5 +146,3 @@ private:
std::string m_name_bound = "";
};
#endif // !CLIENTMEDIA_HEADER

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CLIENTOBJECT_HEADER
#define CLIENTOBJECT_HEADER
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "activeobject.h"
@ -106,5 +105,3 @@ struct DistanceSortedActiveObject
return d < other.d;
}
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CLIENTSIMPLEOBJECT_HEADER
#define CLIENTSIMPLEOBJECT_HEADER
#pragma once
#include "irrlichttypes_bloated.h"
class ClientEnvironment;
@ -34,5 +33,3 @@ public:
virtual void step(float dtime) {}
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CLOUDPARAMS_HEADER
#define CLOUDPARAMS_HEADER
#pragma once
struct CloudParams
{
@ -29,5 +28,3 @@ struct CloudParams
float height;
v2f speed;
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CLOUDS_HEADER
#define CLOUDS_HEADER
#pragma once
#include "irrlichttypes_extrabloated.h"
#include <iostream>
@ -143,7 +142,3 @@ private:
bool m_camera_inside_cloud = false;
};
#endif

@ -1,7 +1,6 @@
// Filled in by the build system
#ifndef CMAKE_CONFIG_H
#define CMAKE_CONFIG_H
#pragma once
#define PROJECT_NAME "@PROJECT_NAME@"
#define PROJECT_NAME_C "@PROJECT_NAME_CAPITALIZED@"
@ -34,6 +33,3 @@
#cmakedefine01 CURSES_HAVE_NCURSES_CURSES_H
#cmakedefine01 CURSES_HAVE_NCURSESW_NCURSES_H
#cmakedefine01 CURSES_HAVE_NCURSESW_CURSES_H
#endif

@ -1,10 +1,6 @@
// Filled in by the build system
// Separated from cmake_config.h to avoid excessive rebuilds on every commit
#ifndef CMAKE_CONFIG_GITHASH_H
#define CMAKE_CONFIG_GITHASH_H
#pragma once
#define VERSION_GITHASH "@VERSION_GITHASH@"
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef COLLISION_HEADER
#define COLLISION_HEADER
#pragma once
#include "irrlichttypes_bloated.h"
#include <vector>
@ -76,7 +75,3 @@ bool wouldCollideWithCeiling(
const std::vector<aabb3f> &staticboxes,
const aabb3f &movingbox,
f32 y_increase, f32 d);
#endif

@ -3,8 +3,7 @@
Otherwise use default values
*/
#ifndef CONFIG_H
#define CONFIG_H
#pragma once
#define STRINGIFY(x) #x
#define STR(x) STRINGIFY(x)
@ -38,5 +37,3 @@
" USE_FREETYPE=" STR(USE_FREETYPE) \
" USE_LUAJIT=" STR(USE_LUAJIT) \
" STATIC_SHAREDIR=" STR(STATIC_SHAREDIR)
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CONSTANTS_HEADER
#define CONSTANTS_HEADER
#pragma once
/*
All kinds of constants.
@ -118,5 +117,3 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define TTF_DEFAULT_FONT_SIZE (16)
#endif
#define DEFAULT_FONT_SIZE (10)
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CONTENT_CAO_HEADER
#define CONTENT_CAO_HEADER
#pragma once
#include <map>
#include "irrlichttypes_extrabloated.h"
@ -214,6 +213,3 @@ public:
return m_prop.infotext;
}
};
#endif

@ -17,14 +17,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CONTENT_CSO_HEADER
#define CONTENT_CSO_HEADER
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "clientsimpleobject.h"
ClientSimpleObject* createSmokePuff(scene::ISceneManager *smgr,
ClientEnvironment *env, v3f pos, v2f size);
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CONTENT_MAPBLOCK_HEADER
#define CONTENT_MAPBLOCK_HEADER
#pragma once
#include "nodedef.h"
#include <IMeshManipulator.h>
@ -146,5 +145,3 @@ public:
MapblockMeshGenerator(MeshMakeData *input, MeshCollector *output);
void generate();
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CONTENT_MAPNODE_HEADER
#define CONTENT_MAPNODE_HEADER
#pragma once
#include "mapnode.h"
@ -33,5 +32,3 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
// Get legacy node name mapping for loading old blocks
class NameIdMapping;
void content_mapnode_get_name_id_mapping(NameIdMapping *nimap);
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CONTENT_NODEMETA_HEADER
#define CONTENT_NODEMETA_HEADER
#pragma once
#include <iostream>
@ -33,6 +32,3 @@ class IItemDefManager;
void content_nodemeta_deserialize_legacy(std::istream &is,
NodeMetadataList *meta, NodeTimerList *timers,
IItemDefManager *item_def_mgr);
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CONTENT_SAO_HEADER
#define CONTENT_SAO_HEADER
#pragma once
#include <util/numeric.h>
#include "serverobject.h"
@ -412,5 +411,3 @@ public:
bool m_physics_override_new_move = true;
bool m_physics_override_sent = false;
};
#endif

@ -17,12 +17,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __CONVERT_JSON_H__
#define __CONVERT_JSON_H__
#pragma once
#include <json/json.h>
Json::Value fetchJsonValue(const std::string &url,
std::vector<std::string> *extra_headers);
#endif
Json::Value fetchJsonValue(const std::string &url,
std::vector<std::string> *extra_headers);

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CRAFTDEF_HEADER
#define CRAFTDEF_HEADER
#pragma once
#include <string>
#include <iostream>
@ -446,6 +445,3 @@ public:
};
IWritableCraftDefManager* createCraftDefManager();
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DATABASE_DUMMY_HEADER
#define DATABASE_DUMMY_HEADER
#pragma once
#include <map>
#include <string>
@ -44,5 +43,3 @@ public:
private:
std::map<s64, std::string> m_database;
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DATABASE_FILES_HEADER
#define DATABASE_FILES_HEADER
#pragma once
// !!! WARNING !!!
// This backend is intended to be used on Minetest 0.4.16 only for the transition backend
@ -42,5 +41,3 @@ private:
std::string m_savedir;
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DATABASE_LEVELDB_HEADER
#define DATABASE_LEVELDB_HEADER
#pragma once
#include "config.h"
@ -47,5 +46,3 @@ private:
};
#endif // USE_LEVELDB
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DATABASE_POSTGRESQL_HEADER
#define DATABASE_POSTGRESQL_HEADER
#pragma once
#include <string>
#include <libpq-fe.h>
@ -145,6 +144,3 @@ protected:
private:
bool playerDataExists(const std::string &playername);
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DATABASE_REDIS_HEADER
#define DATABASE_REDIS_HEADER
#pragma once
#include "config.h"
@ -50,5 +49,3 @@ private:
};
#endif // USE_REDIS
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DATABASE_SQLITE3_HEADER
#define DATABASE_SQLITE3_HEADER
#pragma once
#include <cstring>
#include <string>
@ -192,5 +191,3 @@ private:
sqlite3_stmt *m_stmt_player_metadata_remove = nullptr;
sqlite3_stmt *m_stmt_player_metadata_add = nullptr;
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DATABASE_HEADER
#define DATABASE_HEADER
#pragma once
#include <string>
#include <vector>
@ -61,5 +60,3 @@ public:
virtual bool removePlayer(const std::string &name) = 0;
virtual void listPlayers(std::vector<std::string> &res) = 0;
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DAYNIGHTRATIO_HEADER
#define DAYNIGHTRATIO_HEADER
#pragma once
inline u32 time_to_daynight_ratio(float time_of_day, bool smooth)
{
@ -64,6 +63,3 @@ inline u32 time_to_daynight_ratio(float time_of_day, bool smooth)
return 1000;
}
}
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DEBUG_HEADER
#define DEBUG_HEADER
#pragma once
#include <iostream>
#include <exception>
@ -131,7 +130,3 @@ private:
#define BEGIN_DEBUG_EXCEPTION_HANDLER
#define END_DEBUG_EXCEPTION_HANDLER
#endif
#endif // DEBUG_HEADER

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DEFAULTSETTINGS_HEADER
#define DEFAULTSETTINGS_HEADER
#pragma once
class Settings;
@ -34,5 +33,3 @@ void set_default_settings(Settings *settings);
* @param from source settings pointer
*/
void override_default_settings(Settings *settings, Settings *from);
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DUNGEONGEN_HEADER
#define DUNGEONGEN_HEADER
#pragma once
#include "voxel.h"
#include "noise.h"
@ -109,5 +108,3 @@ public:
extern NoiseParams nparams_dungeon_density;
extern NoiseParams nparams_dungeon_alt_wall;
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef EMERGE_HEADER
#define EMERGE_HEADER
#pragma once
#include <map>
#include <mutex>
@ -174,5 +173,3 @@ private:
friend class EmergeThread;
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef ENVIRONMENT_HEADER
#define ENVIRONMENT_HEADER
#pragma once
/*
This class is the game's environment.
@ -144,5 +143,3 @@ protected:
private:
std::mutex m_time_lock;
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef EVENT_HEADER
#define EVENT_HEADER
#pragma once
class MtEvent
{
@ -67,6 +66,3 @@ public:
virtual void reg(MtEventReceiver *r, const char *type) = 0;
virtual void dereg(MtEventReceiver *r, const char *type) = 0;
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef EVENT_MANAGER_HEADER
#define EVENT_MANAGER_HEADER
#pragma once
#include "event.h"
#include <list>
@ -110,6 +109,3 @@ public:
dereg(type, EventManager::receiverReceive, r);
}
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef EXCEPTIONS_HEADER
#define EXCEPTIONS_HEADER
#pragma once
#include <exception>
#include <string>
@ -129,6 +128,3 @@ public:
BaseException(s)
{}
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef FACE_POSITION_CACHE_HEADER
#define FACE_POSITION_CACHE_HEADER
#pragma once
#include "irr_v3d.h"
@ -40,5 +39,3 @@ private:
static std::unordered_map<u16, std::vector<v3s16>> cache;
static std::mutex cache_mutex;
};
#endif

@ -18,8 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef FILECACHE_HEADER
#define FILECACHE_HEADER
#pragma once
#include <iostream>
#include <string>
@ -41,5 +40,3 @@ private:
bool loadByPath(const std::string &path, std::ostream &os);
bool updateByPath(const std::string &path, const std::string &data);
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef FILESYS_HEADER
#define FILESYS_HEADER
#pragma once
#include <string>
#include <vector>
@ -118,6 +117,3 @@ bool safeWriteToFile(const std::string &path, const std::string &content);
bool Rename(const std::string &from, const std::string &to);
} // namespace fs
#endif

@ -16,8 +16,8 @@ You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __FONTENGINE_H__
#define __FONTENGINE_H__
#pragma once
#include <map>
#include <vector>
@ -135,5 +135,3 @@ private:
/** interface to access main font engine*/
extern FontEngine* g_fontengine;
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef GAME_HEADER
#define GAME_HEADER
#pragma once
#include "irrlichttypes.h"
#include <string>
@ -52,5 +51,3 @@ void the_game(bool *kill,
bool *reconnect_requested,
const SubgameSpec &gamespec, // Used for local game
bool simple_singleplayer_mode);
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef GAMEDEF_HEADER
#define GAMEDEF_HEADER
#pragma once
#include <string>
#include <vector>
@ -80,6 +79,3 @@ public:
virtual bool registerModStorage(ModMetadata *storage) = 0;
virtual void unregisterModStorage(const std::string &name) = 0;
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef GAME_PARAMS_H
#define GAME_PARAMS_H
#pragma once
#include "irrlichttypes.h"
@ -31,5 +30,3 @@ struct GameParams
SubgameSpec game_spec;
bool is_dedicated_server;
};
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef GENERICOBJECT_HEADER
#define GENERICOBJECT_HEADER
#pragma once
#include <string>
#include "irrlichttypes_bloated.h"
@ -83,6 +82,3 @@ std::string gob_cmd_update_nametag_attributes(video::SColor color);
std::string gob_cmd_update_infant(u16 id, u8 type,
const std::string &client_initialization_data);
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef GETTEXT_HEADER
#define GETTEXT_HEADER
#pragma once
#include "config.h" // for USE_GETTEXT
#include <string>
@ -59,5 +58,3 @@ inline std::string strgettext(const std::string &text)
{
return gettext(text.c_str());
}
#endif

@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,