Switched to the #pragma once system

This commit is contained in:
2015-07-07 17:35:58 +10:00
parent f82b0a8843
commit 24eb730c72
71 changed files with 71 additions and 285 deletions
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef TIMER_HPP_
#define TIMER_HPP_
#pragma once
#include <chrono>
#include <string>
@@ -50,5 +49,3 @@ private:
};
std::ostream& operator<<(std::ostream& os, Timer& t);
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef CHARACTERDEFINES_HPP_
#define CHARACTERDEFINES_HPP_
#pragma once
#include <cmath>
@@ -38,5 +37,3 @@ constexpr int CHARACTER_BOUNDS_HEIGHT = 32;
//the character's sprite format
constexpr int CHARACTER_CELLS_X = 4;
constexpr int CHARACTER_CELLS_Y = 4;
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef IMAGE_HPP_
#define IMAGE_HPP_
#pragma once
#include "SDL/SDL.h"
#include <string>
@@ -69,5 +68,3 @@ protected:
SDL_Rect clip = {0, 0, 0, 0};
bool local = false;
};
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef SPRITESHEET_HPP_
#define SPRITESHEET_HPP_
#pragma once
#include "image.hpp"
@@ -62,5 +61,3 @@ private:
Uint16 xIndex = 0, yIndex = 0; //current cell being drawn
double delay = 0.0, tick = 0.0;
};
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef TILESHEET_HPP_
#define TILESHEET_HPP_
#pragma once
#include "region.hpp"
@@ -50,5 +49,3 @@ private:
Image image;
int xCount = 0, yCount = 0;
};
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef REGION_HPP_
#define REGION_HPP_
#pragma once
#include <bitset>
@@ -59,5 +58,3 @@ private:
type_t tiles[REGION_WIDTH][REGION_HEIGHT][REGION_DEPTH];
std::bitset<REGION_WIDTH*REGION_HEIGHT> solid;
};
#endif
+1 -4
View File
@@ -19,12 +19,9 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef REGIONAPI_HPP_
#define REGIONAPI_HPP_
#pragma once
#include "lua.hpp"
#define TORTUGA_REGION_API "region"
LUAMOD_API int openRegionAPI(lua_State* L);
#endif
+1 -4
View File
@@ -19,12 +19,9 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef REGIONPAGERAPI_HPP_
#define REGIONPAGERAPI_HPP_
#pragma once
#include "lua.hpp"
#define TORTUGA_REGION_PAGER_API "region_pager"
LUAMOD_API int openRegionPagerAPI(lua_State* L);
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef REGIONPAGERBASE_HPP_
#define REGIONPAGERBASE_HPP_
#pragma once
#include "region.hpp"
@@ -57,5 +56,3 @@ public:
protected:
std::list<Region> regionList;
};
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef REGIONPAGERLUA_HPP_
#define REGIONPAGERLUA_HPP_
#pragma once
#include "region_pager_base.hpp"
@@ -65,5 +64,3 @@ protected:
int createRef = LUA_NOREF;
int unloadRef = LUA_NOREF;
};
#endif
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef CHARACTERPACKET_HPP_
#define CHARACTERPACKET_HPP_
#pragma once
#include "serial_packet_base.hpp"
@@ -45,5 +44,3 @@ struct CharacterPacket : SerialPacketBase {
void serializeCharacter(void* buffer, CharacterPacket* packet);
void deserializeCharacter(void* buffer, CharacterPacket* packet);
#endif
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef CLIENTPACKET_HPP_
#define CLIENTPACKET_HPP_
#pragma once
#include "serial_packet_base.hpp"
@@ -33,5 +32,3 @@ struct ClientPacket : SerialPacketBase {
void serializeClient(void* buffer, ClientPacket* packet);
void deserializeClient(void* buffer, ClientPacket* packet);
#endif
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef MONSTERPACKET_HPP_
#define MONSTERPACKET_HPP_
#pragma once
#include "serial_packet_base.hpp"
@@ -42,5 +41,3 @@ struct MonsterPacket : SerialPacketBase {
void serializeMonster(void* buffer, MonsterPacket* packet);
void deserializeMonster(void* buffer, MonsterPacket* packet);
#endif
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef REGIONPACKET_HPP_
#define REGIONPACKET_HPP_
#pragma once
#include "serial_packet_base.hpp"
@@ -44,5 +43,3 @@ struct RegionPacket : SerialPacketBase {
void serializeRegion(void* buffer, RegionPacket* packet);
void deserializeRegion(void* buffer, RegionPacket* packet);
#endif
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef SERIALPACKETBASE_HPP_
#define SERIALPACKETBASE_HPP_
#pragma once
#include "serial_packet_type.hpp"
@@ -35,5 +34,3 @@ struct SerialPacketBase {
virtual ~SerialPacketBase() {};
};
#endif
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef SERVERPACKET_HPP_
#define SERVERPACKET_HPP_
#pragma once
#include "serial_packet_base.hpp"
@@ -33,5 +32,3 @@ struct ServerPacket : SerialPacketBase {
void serializeServer(void* buffer, ServerPacket* packet);
void deserializeServer(void* buffer, ServerPacket* packet);
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef TEXTPACKET_HPP_
#define TEXTPACKET_HPP_
#pragma once
#include "serial_packet_base.hpp"
@@ -36,5 +35,3 @@ struct TextPacket : SerialPacketBase {
void serializeText(void* buffer, TextPacket* packet);
void deserializeText(void* buffer, TextPacket* packet);
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef SERIALPACKET_HPP_
#define SERIALPACKET_HPP_
#pragma once
#include "serial_packet_base.hpp"
#include "character_packet.hpp"
@@ -62,5 +61,3 @@ constexpr int PACKET_BUFFER_SIZE =
REGION_METADATA_FOOTPRINT +
REGION_TILE_FOOTPRINT +
REGION_SOLID_FOOTPRINT;
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef SERIALPACKETTYPE_HPP_
#define SERIALPACKETTYPE_HPP_
#pragma once
/* DOCS: The headers indicate what packet type is used for each message
* different messages under the same header will carry different amounts of
@@ -183,5 +182,3 @@ enum class SerialPacketType {
LAST
};
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef SERIALIZEUTILITY_HPP_
#define SERIALIZEUTILITY_HPP_
#pragma once
#include "serial_packet_base.hpp"
@@ -33,5 +32,3 @@ void deserialCopy(void** buffer, void* data, int size);
//primary functions
void serializePacket(void* buffer, SerialPacketBase* packet);
void deserializePacket(void* buffer, SerialPacketBase* packet);
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef UDPNETWORKUTILITY_HPP_
#define UDPNETWORKUTILITY_HPP_
#pragma once
//common
#include "serial_packet_base.hpp"
@@ -73,5 +72,3 @@ private:
UDPsocket socket = nullptr;
UDPpacket* packet = nullptr;
};
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef BUTTON_HPP_
#define BUTTON_HPP_
#pragma once
#include "image.hpp"
#include "raster_font.hpp"
@@ -90,5 +89,3 @@ private:
State state = State::NORMAL;
std::string text;
};
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef MENUBAR_HPP_
#define MENUBAR_HPP_
#pragma once
#include "image.hpp"
#include "raster_font.hpp"
@@ -88,5 +87,3 @@ private:
friend class MenuBar;
};
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef RASTERFONT_HPP_
#define RASTERFONT_HPP_
#pragma once
#include "image.hpp"
@@ -50,5 +49,3 @@ public:
private:
Image image;
};
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef BOUNDINGBOX_HPP_
#define BOUNDINGBOX_HPP_
#pragma once
#include <type_traits>
#include <algorithm>
@@ -74,5 +73,3 @@ inline BoundingBox operator+(BoundingBox b, Vector2 v) {
inline BoundingBox operator+(Vector2 v, BoundingBox b) {
return b + v;
}
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef CONFIGUTILITY_HPP_
#define CONFIGUTILITY_HPP_
#pragma once
#include "singleton.hpp"
@@ -51,5 +50,3 @@ private:
table_t configMap;
};
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef FRAMERATE_HPP_
#define FRAMERATE_HPP_
#pragma once
#include <chrono>
@@ -44,5 +43,3 @@ private:
int lastFrameRate = 0;
Clock::time_point tick = Clock::now();
};
#endif
+1 -4
View File
@@ -19,13 +19,10 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef IPOPERATORS_HPP_
#define IPOPERATORS_HPP_
#pragma once
#include "SDL_net.h"
//these should've come standard
bool operator==(IPaddress lhs, IPaddress rhs);
bool operator!=(IPaddress lhs, IPaddress rhs);
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef SINGLETON_HPP_
#define SINGLETON_HPP_
#pragma once
#include <stdexcept>
@@ -59,5 +58,3 @@ private:
template<typename T>
T* Singleton<T>::ptr = nullptr;
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef VECTOR2_HPP_
#define VECTOR2_HPP_
#pragma once
#include <type_traits>
#include <stdexcept>
@@ -110,5 +109,3 @@ public:
//This is explicitly a POD
static_assert(std::is_pod<Vector2>::value, "Vector2 is not a POD");
#endif