Skip to content

Commit

Permalink
Include guards became unique.
Browse files Browse the repository at this point in the history
Include guards prevent the multiple inclusion of header files only correctly
if the chosen identifiers are different from others with such a functionality.
The probability for name clashes was reduced by the addition of the project name
as a prefix and a kind of universally unique identifier as a suffix.

Signed-off-by: Markus Elfring <[email protected]>
  • Loading branch information
elfring committed Dec 3, 2013
1 parent f4efc16 commit e618d81
Show file tree
Hide file tree
Showing 81 changed files with 162 additions and 162 deletions.
4 changes: 2 additions & 2 deletions src/account.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef ACCOUNT_H
#define ACCOUNT_H
#ifndef FS_ACCOUNT_H_34817537BA2B4CB7B71AA562AFBB118F
#define FS_ACCOUNT_H_34817537BA2B4CB7B71AA562AFBB118F

#include "enums.h"

Expand Down
4 changes: 2 additions & 2 deletions src/actions.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef ACTIONS_H
#define ACTIONS_H
#ifndef FS_ACTIONS_H_87F60C5F587E4B84948F304A6451E6E6
#define FS_ACTIONS_H_87F60C5F587E4B84948F304A6451E6E6

#include "baseevents.h"
#include "enums.h"
Expand Down
4 changes: 2 additions & 2 deletions src/admin.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef ADMIN_H
#define ADMIN_H
#ifndef FS_ADMIN_H_6B5C0B3A0C5E4C49A806E3B224CF6787
#define FS_ADMIN_H_6B5C0B3A0C5E4C49A806E3B224CF6787

// -> server
// command(1 byte) | size(2 bytes) | parameters(size bytes)
Expand Down
4 changes: 2 additions & 2 deletions src/ban.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef BAN_H
#define BAN_H
#ifndef FS_BAN_H_CADB975222D745F0BDA12D982F1006E3
#define FS_BAN_H_CADB975222D745F0BDA12D982F1006E3

struct BanInfo {
std::string bannedBy;
Expand Down
4 changes: 2 additions & 2 deletions src/baseevents.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef BASEEVENTS_H
#define BASEEVENTS_H
#ifndef FS_BASEEVENTS_H_9994E32C91CE4D95912A5FDD1F41884A
#define FS_BASEEVENTS_H_9994E32C91CE4D95912A5FDD1F41884A

#include "luascript.h"

Expand Down
4 changes: 2 additions & 2 deletions src/beds.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef BEDS_H
#define BEDS_H
#ifndef FS_BEDS_H_84DE19758D424C6C9789189231946BFF
#define FS_BEDS_H_84DE19758D424C6C9789189231946BFF

#include "item.h"

Expand Down
4 changes: 2 additions & 2 deletions src/chat.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef CHAT_H
#define CHAT_H
#ifndef FS_CHAT_H_F1574642D0384ABFAB52B7ED906E5628
#define FS_CHAT_H_F1574642D0384ABFAB52B7ED906E5628

#include "const.h"
#include "luascript.h"
Expand Down
4 changes: 2 additions & 2 deletions src/combat.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef COMBAT_H
#define COMBAT_H
#ifndef FS_COMBAT_H_B02CE79230FC43708699EE91FCC8F7CC
#define FS_COMBAT_H_B02CE79230FC43708699EE91FCC8F7CC

#include "thing.h"
#include "condition.h"
Expand Down
4 changes: 2 additions & 2 deletions src/commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef COMMANDS_H
#define COMMANDS_H
#ifndef FS_COMMANDS_H_C95A575CCADF434699D26CD042690970
#define FS_COMMANDS_H_C95A575CCADF434699D26CD042690970

#include "enums.h"

Expand Down
4 changes: 2 additions & 2 deletions src/condition.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef CONDITION_H
#define CONDITION_H
#ifndef FS_CONDITION_H_F92FF8BDDD5B4EA59E2B1BB5C9C0A086
#define FS_CONDITION_H_F92FF8BDDD5B4EA59E2B1BB5C9C0A086

#include "fileloader.h"
#include "enums.h"
Expand Down
4 changes: 2 additions & 2 deletions src/configmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef CONFIGMANAGER_H
#define CONFIGMANAGER_H
#ifndef FS_CONFIGMANAGER_H_6BDD23BD0B8344F4B7C40E8BE6AF6F39
#define FS_CONFIGMANAGER_H_6BDD23BD0B8344F4B7C40E8BE6AF6F39

#include <lua.hpp>

Expand Down
4 changes: 2 additions & 2 deletions src/connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef CONNECTION_H
#define CONNECTION_H
#ifndef FS_CONNECTION_H_FC8E1B4392D24D27A2F129D8B93A6348
#define FS_CONNECTION_H_FC8E1B4392D24D27A2F129D8B93A6348

#include <unordered_set>

Expand Down
4 changes: 2 additions & 2 deletions src/const.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef CONST_H
#define CONST_H
#ifndef FS_CONST_H_0A49B5996F074465BF44B90F4F780E8B
#define FS_CONST_H_0A49B5996F074465BF44B90F4F780E8B

#define NETWORKMESSAGE_MAXSIZE 24590

Expand Down
4 changes: 2 additions & 2 deletions src/container.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef CONTAINER_H
#define CONTAINER_H
#ifndef FS_CONTAINER_H_5590165FD8A2451B98D71F13CD3ED8DC
#define FS_CONTAINER_H_5590165FD8A2451B98D71F13CD3ED8DC

#include <queue>

Expand Down
4 changes: 2 additions & 2 deletions src/creature.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef CREATURE_H
#define CREATURE_H
#ifndef FS_CREATURE_H_5363C04015254E298F84E6D59A139508
#define FS_CREATURE_H_5363C04015254E298F84E6D59A139508

#include "map.h"
#include "position.h"
Expand Down
4 changes: 2 additions & 2 deletions src/creatureevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef CREATUREEVENT_H
#define CREATUREEVENT_H
#ifndef FS_CREATUREEVENT_H_73FCAF4608CB41399D53C919316646A9
#define FS_CREATUREEVENT_H_73FCAF4608CB41399D53C919316646A9

#include "luascript.h"
#include "baseevents.h"
Expand Down
4 changes: 2 additions & 2 deletions src/cylinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef CYLINDER_H
#define CYLINDER_H
#ifndef FS_CYLINDER_H_54BBCEB2A5B7415DAD837E4D58115150
#define FS_CYLINDER_H_54BBCEB2A5B7415DAD837E4D58115150

#include "enums.h"
#include "thing.h"
Expand Down
4 changes: 2 additions & 2 deletions src/database.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef DATABASE_H
#define DATABASE_H
#ifndef FS_DATABASE_H_A484B0CDFDE542838F506DCE3D40C693
#define FS_DATABASE_H_A484B0CDFDE542838F506DCE3D40C693

#include <boost/lexical_cast.hpp>

Expand Down
4 changes: 2 additions & 2 deletions src/databasemanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef DATABASEMANAGER_H
#define DATABASEMANAGER_H
#ifndef FS_DATABASEMANAGER_H_2B75821C555E4D1D83E32B20D683217C
#define FS_DATABASEMANAGER_H_2B75821C555E4D1D83E32B20D683217C
#include "database.h"

class DatabaseManager
Expand Down
4 changes: 2 additions & 2 deletions src/definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef DEFINITIONS_H
#define DEFINITIONS_H
#ifndef FS_DEFINITIONS_H_877452FEC245450C9F96B8FD268D8963
#define FS_DEFINITIONS_H_877452FEC245450C9F96B8FD268D8963

#define STATUS_SERVER_NAME "The Forgotten Server"
#define STATUS_SERVER_VERSION "1.0"
Expand Down
4 changes: 2 additions & 2 deletions src/depotchest.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef DEPOTCHEST_H
#define DEPOTCHEST_H
#ifndef FS_DEPOTCHEST_H_6538526014684E3DBC92CC12815B6766
#define FS_DEPOTCHEST_H_6538526014684E3DBC92CC12815B6766

#include "container.h"

Expand Down
4 changes: 2 additions & 2 deletions src/depotlocker.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef DEPOTLOCKER_H
#define DEPOTLOCKER_H
#ifndef FS_DEPOTLOCKER_H_53AD8E0606A34070B87F792611F4F3F8
#define FS_DEPOTLOCKER_H_53AD8E0606A34070B87F792611F4F3F8

#include "container.h"
#include "inbox.h"
Expand Down
4 changes: 2 additions & 2 deletions src/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef ENUMS_H
#define ENUMS_H
#ifndef FS_ENUMS_H_003445999FEE4A67BCECBE918B0124CE
#define FS_ENUMS_H_003445999FEE4A67BCECBE918B0124CE

enum itemAttrTypes {
ATTR_ITEM_NONE = 0,
Expand Down
4 changes: 2 additions & 2 deletions src/fileloader.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef FILELOADER_H
#define FILELOADER_H
#ifndef FS_FILELOADER_H_9B663D19E58D42E6BFACFE5B09D7A05E
#define FS_FILELOADER_H_9B663D19E58D42E6BFACFE5B09D7A05E

struct NodeStruct;

Expand Down
4 changes: 2 additions & 2 deletions src/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef GAME_H
#define GAME_H
#ifndef FS_GAME_H_3EC96D67DD024E6093B3BAC29B7A6D7F
#define FS_GAME_H_3EC96D67DD024E6093B3BAC29B7A6D7F

#include "account.h"
#include "combat.h"
Expand Down
4 changes: 2 additions & 2 deletions src/globalevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef GLOBALEVENT_H
#define GLOBALEVENT_H
#ifndef FS_GLOBALEVENT_H_B3FB9B848EA3474B9AFC326873947E3C
#define FS_GLOBALEVENT_H_B3FB9B848EA3474B9AFC326873947E3C
#include "baseevents.h"

#include "const.h"
Expand Down
4 changes: 2 additions & 2 deletions src/groups.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef GROUPS_H
#define GROUPS_H
#ifndef FS_GROUPS_H_EE39438337D148E1983FB79D936DD8F3
#define FS_GROUPS_H_EE39438337D148E1983FB79D936DD8F3

struct Group {
std::string name;
Expand Down
4 changes: 2 additions & 2 deletions src/guild.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef GUILD_H
#define GUILD_H
#ifndef FS_GUILD_H_C00F0A1D732E4BA88FF62ACBE74D76BC
#define FS_GUILD_H_C00F0A1D732E4BA88FF62ACBE74D76BC

class Player;
typedef std::list<Player*> PlayerList;
Expand Down
4 changes: 2 additions & 2 deletions src/house.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef HOUSE_H
#define HOUSE_H
#ifndef FS_HOUSE_H_EB9732E7771A438F9CD0EFA8CB4C58C4
#define FS_HOUSE_H_EB9732E7771A438F9CD0EFA8CB4C58C4

#include <regex>

Expand Down
4 changes: 2 additions & 2 deletions src/housetile.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef HOUSETILE_H
#define HOUSETILE_H
#ifndef FS_HOUSETILE_H_57D59BEC1CE741D9B142BFC54634505B
#define FS_HOUSETILE_H_57D59BEC1CE741D9B142BFC54634505B

#include "tile.h"

Expand Down
4 changes: 2 additions & 2 deletions src/inbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef INBOX_H
#define INBOX_H
#ifndef FS_INBOX_H_C3EF10190329447883B9C3479234EE5C
#define FS_INBOX_H_C3EF10190329447883B9C3479234EE5C

#include "container.h"

Expand Down
4 changes: 2 additions & 2 deletions src/ioguild.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef IOGUILD_H
#define IOGUILD_H
#ifndef FS_IOGUILD_H_EF9ACEBA0B844C388B70FF52E69F1AFF
#define FS_IOGUILD_H_EF9ACEBA0B844C388B70FF52E69F1AFF

typedef std::vector<uint32_t> GuildWarList;

Expand Down
4 changes: 2 additions & 2 deletions src/iologindata.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef IOLOGINDATA_H
#define IOLOGINDATA_H
#ifndef FS_IOLOGINDATA_H_28B0440BEC594654AC0F4E1A5E42B2EF
#define FS_IOLOGINDATA_H_28B0440BEC594654AC0F4E1A5E42B2EF

#include "account.h"
#include "player.h"
Expand Down
4 changes: 2 additions & 2 deletions src/iomap.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef IOMAP_H
#define IOMAP_H
#ifndef FS_IOMAP_H_8085D4B1037A44288494A52FDBB775E4
#define FS_IOMAP_H_8085D4B1037A44288494A52FDBB775E4

#include "item.h"
#include "map.h"
Expand Down
4 changes: 2 additions & 2 deletions src/iomapserialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef IOMAPSERIALIZE_H
#define IOMAPSERIALIZE_H
#ifndef FS_IOMAPSERIALIZE_H_7E903658F34E44F9BE03A713B55A3D6D
#define FS_IOMAPSERIALIZE_H_7E903658F34E44F9BE03A713B55A3D6D

#include "database.h"
#include "map.h"
Expand Down
4 changes: 2 additions & 2 deletions src/iomarket.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef IOMARKET_H
#define IOMARKET_H
#ifndef FS_IOMARKET_H_B981E52C218C42D3B9EF726EBF0E92C9
#define FS_IOMARKET_H_B981E52C218C42D3B9EF726EBF0E92C9

#include "enums.h"

Expand Down
Loading

0 comments on commit e618d81

Please sign in to comment.