浏览代码

Harmonized include guards
* Follow up to 24b3509 and c4a364b.
* Harmonized the include guards for char-server and map-server header files.

aleos89 7 年之前
父节点
当前提交
728a29d435

+ 3 - 5
src/char/char.hpp

@@ -1,15 +1,14 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#ifndef _CHAR_SQL_H_
-#define _CHAR_SQL_H_
+#ifndef _CHAR_HPP_
+#define _CHAR_HPP_
 
 #include "../config/core.h"
 #include "../common/core.h" // CORE_ST_LAST
 #include "../common/msg_conf.h"
 #include "../common/mmo.h"
 
-
 extern int login_fd; //login file descriptor
 extern int char_fd; //char file descriptor
 
@@ -321,5 +320,4 @@ const char* char_msg_txt(int msg_number);
 void char_do_final_msg(void);
 bool char_config_read(const char* cfgName, bool normal);
 
-
-#endif /* _CHAR_SQL_H_ */
+#endif /* _CHAR_HPP_ */

+ 0 - 1
src/char/char_clif.cpp

@@ -21,7 +21,6 @@
 #include "char_logif.hpp"
 #include "char_mapif.hpp"
 
-
 #if PACKETVER_SUPPORTS_PINCODE
 bool pincode_allowed( char* pincode );
 #endif

+ 4 - 5
src/char/char_clif.hpp

@@ -1,13 +1,12 @@
 // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
+#ifndef _CHAR_CLIF_HPP_
+#define _CHAR_CLIF_HPP_
 
-#ifndef CHAR_CLIF_H
-#define	CHAR_CLIF_H
-
-//#include "char.h"
 #include "../common/cbasetypes.h"
 #include "../common/timer.h" //time_t
+
 struct char_session_data;
 enum pincode_state : uint8;
 
@@ -54,5 +53,5 @@ void chclif_block_character( int fd, struct char_session_data* sd);
 
 int chclif_parse(int fd);
 
-#endif	/* CHAR_CLIF_H */
+#endif	/* _CHAR_CLIF_HPP_ */
 

+ 2 - 0
src/char/char_cnslif.cpp

@@ -5,11 +5,13 @@
 
 #include <stdlib.h>
 #include <string.h>
+
 #include "../common/socket.h"
 #include "../common/showmsg.h"
 #include "../common/timer.h"
 #include "../common/ers.h"
 #include "../common/cli.h"
+
 #include "char.hpp"
 
 /*======================================================

+ 4 - 9
src/char/char_cnslif.hpp

@@ -1,20 +1,15 @@
 // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-
-#ifndef CHAR_CNSLIF_H
-#define	CHAR_CNSLIF_H
-
+#ifndef _CHAR_CNSLIF_HPP_
+#define _CHAR_CNSLIF_HPP_
 
 int cnslif_parse(const char* buf);
 void do_init_chcnslif(void);
-#ifdef	__cplusplus
+
 extern "C" {
-#endif
 void display_helpscreen(bool do_exit);
-#ifdef	__cplusplus
 }
-#endif
 
-#endif	/* CHAR_CNSLIF_H */
+#endif	/* _CHAR_CNSLIF_HPP_ */
 

+ 1 - 1
src/char/char_logif.cpp

@@ -1,5 +1,6 @@
 // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
+
 #include "char_logif.hpp"
 
 #include <stdlib.h>
@@ -18,7 +19,6 @@
 #include "char_clif.hpp"
 #include "char_mapif.hpp"
 
-
 //early declaration
 void chlogif_on_ready(void);
 void chlogif_on_disconnect(void);

+ 4 - 7
src/char/char_logif.hpp

@@ -1,12 +1,11 @@
 // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-
-#ifndef CHAR_LOGIF_H
-#define	CHAR_LOGIF_H
+#ifndef _CHAR_LOGIF_HPP_
+#define _CHAR_LOGIF_HPP_
 
 #include "../common/cbasetypes.h"
-//#include "char.hpp"
+
 struct char_session_data;
 
 #if PACKETVER_SUPPORTS_PINCODE
@@ -53,9 +52,7 @@ void chlogif_on_disconnect(void);
 void chlogif_on_ready(void);
 void do_final_chlogif(void);
 
-
 #define loginif_check(a) { if(!chlogif_isconnected()) return a; }
 
-
-#endif	/* CHAR_LOGIF_H */
+#endif	/* _CHAR_LOGIF_HPP_ */
 

+ 3 - 1
src/char/char_mapif.cpp

@@ -6,7 +6,9 @@
  * @author Athena Dev Teams originally in login.c
  * @author rAthena Dev Team
  */
+
 #include "char_mapif.hpp"
+
 #include <stdlib.h>
 #include <string.h> //memcpy
 
@@ -15,11 +17,11 @@
 #include "../common/malloc.h"
 #include "../common/showmsg.h"
 #include "../common/strlib.h"
+
 #include "inter.hpp"
 #include "char.hpp"
 #include "char_logif.hpp"
 
-
 /**
  * Packet send to all map-servers, attach to ourself
  * @param buf: packet to send in form of an array buffer

+ 3 - 4
src/char/char_mapif.hpp

@@ -7,8 +7,8 @@
  * @author rAthena Dev Team
  */
 
-#ifndef CHAR_MAPIF_H
-#define	CHAR_MAPIF_H
+#ifndef _CHAR_MAPIF_HPP_
+#define _CHAR_MAPIF_HPP_
 
 #include "../common/cbasetypes.h"
 
@@ -63,6 +63,5 @@ void chmapif_server_reset(int id);
 void chmapif_on_disconnect(int id);
 void do_final_chmapif(void);
 
-
-#endif	/* CHAR_MAPIF_H */
+#endif	/* _CHAR_MAPIF_HPP_ */
 

+ 3 - 5
src/char/int_achievement.hpp

@@ -1,11 +1,9 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#ifndef _INT_ACHIEVEMENT_SQL_H_
-#define _INT_ACHIEVEMENT_SQL_H_
-
+#ifndef _INT_ACHIEVEMENT_HPP_
+#define _INT_ACHIEVEMENT_HPP_
 
 int inter_achievement_parse_frommap(int fd);
 
-
-#endif /* _INT_ACHIEVEMENT_SQL_H_ */
+#endif /* _INT_ACHIEVEMENT_HPP_ */

+ 0 - 1
src/char/int_auction.cpp

@@ -20,7 +20,6 @@
 #include "inter.hpp"
 #include "int_mail.hpp"
 
-
 static DBMap* auction_db_ = NULL; // int auction_id -> struct auction_data*
 
 void auction_delete(struct auction_data *auction);

+ 3 - 5
src/char/int_auction.hpp

@@ -1,14 +1,12 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#ifndef _INT_AUCTION_SQL_H_
-#define _INT_AUCTION_SQL_H_
-
+#ifndef _INT_AUCTION_HPP_
+#define _INT_AUCTION_HPP_
 
 int inter_auction_parse_frommap(int fd);
 
 int inter_auction_sql_init(void);
 void inter_auction_sql_final(void);
 
-
-#endif /* _INT_AUCTION_SQL_H_ */
+#endif /* _INT_AUCTION_HPP_ */

+ 0 - 1
src/char/int_clan.cpp

@@ -17,7 +17,6 @@
 #include "char_mapif.hpp"
 #include "inter.hpp"
 
-
 //clan cache
 static DBMap* clan_db; // int clan_id -> struct clan*
 

+ 3 - 3
src/char/int_clan.hpp

@@ -1,11 +1,11 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#ifndef _INT_CLAN_H_
-#define _INT_CLAN_H_
+#ifndef _INT_CLAN_HPP_
+#define _INT_CLAN_HPP_
 
 int inter_clan_parse_frommap( int fd );
 int inter_clan_init(void);
 void inter_clan_final(void);
 
-#endif /* _INT_CLAN_H_ */
+#endif /* _INT_CLAN_HPP_ */

+ 0 - 1
src/char/int_elemental.cpp

@@ -15,7 +15,6 @@
 #include "char.hpp"
 #include "inter.hpp"
 
-
 bool mapif_elemental_save(struct s_elemental* ele) {
 	bool flag = true;
 

+ 3 - 5
src/char/int_elemental.hpp

@@ -1,9 +1,8 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#ifndef _INT_ELEMENTAL_SQL_H_
-#define _INT_ELEMENTAL_SQL_H_
-
+#ifndef _INT_ELEMENTAL_HPP_
+#define _INT_ELEMENTAL_HPP_
 
 struct s_elemental;
 
@@ -13,5 +12,4 @@ int inter_elemental_parse_frommap(int fd);
 
 bool mapif_elemental_delete(int ele_id);
 
-
-#endif /* _INT_ELEMENTAL_SQL_H_ */
+#endif /* _INT_ELEMENTAL_HPP_ */

+ 0 - 1
src/char/int_guild.cpp

@@ -19,7 +19,6 @@
 #include "char_mapif.hpp"
 #include "inter.hpp"
 
-
 #define GS_MEMBER_UNMODIFIED 0x00
 #define GS_MEMBER_MODIFIED 0x01
 #define GS_MEMBER_NEW 0x02

+ 3 - 3
src/char/int_guild.hpp

@@ -1,8 +1,8 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#ifndef _INT_GUILD_SQL_H_
-#define _INT_GUILD_SQL_H_
+#ifndef _INT_GUILD_HPP_
+#define _INT_GUILD_HPP_
 
 #include "../common/cbasetypes.h"
 
@@ -36,4 +36,4 @@ int inter_guild_charname_changed(int guild_id,uint32 account_id, uint32 char_id,
 int inter_guild_CharOnline(uint32 char_id, int guild_id);
 int inter_guild_CharOffline(uint32 char_id, int guild_id);
 
-#endif /* _INT_GUILD_SQL_H_ */
+#endif /* _INT_GUILD_HPP_ */

+ 0 - 1
src/char/int_homun.cpp

@@ -16,7 +16,6 @@
 #include "char.hpp"
 #include "inter.hpp"
 
-
 int inter_homunculus_sql_init(void)
 {
 	return 0;

+ 4 - 4
src/char/int_homun.hpp

@@ -1,10 +1,11 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#ifndef _INT_HOMUN_SQL_H_
-#define _INT_HOMUN_SQL_H_
+#ifndef _INT_HOMUN_HPP_
+#define _INT_HOMUN_HPP_
 
 #include "../common/cbasetypes.h"
+
 struct s_homunculus;
 
 int inter_homunculus_sql_init(void);
@@ -16,5 +17,4 @@ bool mapif_homunculus_load(int homun_id, struct s_homunculus* hd);
 bool mapif_homunculus_delete(int homun_id);
 bool mapif_homunculus_rename(char *name);
 
-
-#endif /* _INT_HOMUN_SQL_H_ */
+#endif /* _INT_HOMUN_HPP_ */

+ 4 - 3
src/char/int_mail.hpp

@@ -1,10 +1,11 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#ifndef _INT_MAIL_SQL_H_
-#define _INT_MAIL_SQL_H_
+#ifndef _INT_MAIL_HPP_
+#define _INT_MAIL_HPP_
 
 #include "../common/cbasetypes.h"
+
 struct mail_message;
 
 
@@ -22,4 +23,4 @@ void mapif_Mail_new(struct mail_message *msg);
 
 
 
-#endif /* _INT_MAIL_SQL_H_ */
+#endif /* _INT_MAIL_HPP_ */

+ 3 - 5
src/char/int_mercenary.hpp

@@ -1,13 +1,11 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#ifndef _INT_MERCENARY_SQL_H_
-#define _INT_MERCENARY_SQL_H_
+#ifndef _INT_MERCENARY_HPP_
+#define _INT_MERCENARY_HPP_
 
 #include "../common/cbasetypes.h"
 
-// struct s_mercenary;
-
 int inter_mercenary_sql_init(void);
 void inter_mercenary_sql_final(void);
 int inter_mercenary_parse_frommap(int fd);
@@ -20,4 +18,4 @@ bool mercenary_owner_delete(uint32 char_id);
 bool mapif_mercenary_delete(int merc_id);
 
 
-#endif /* _INT_MERCENARY_SQL_H_ */
+#endif /* _INT_MERCENARY_HPP_ */

+ 0 - 1
src/char/int_party.cpp

@@ -19,7 +19,6 @@
 #include "char_mapif.hpp"
 #include "inter.hpp"
 
-
 struct party_data {
 	struct party party;
 	unsigned int min_lv, max_lv;

+ 3 - 3
src/char/int_party.hpp

@@ -1,8 +1,8 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#ifndef _INT_PARTY_SQL_H_
-#define _INT_PARTY_SQL_H_
+#ifndef _INT_PARTY_HPP_
+#define _INT_PARTY_HPP_
 
 #include "../common/cbasetypes.h"
 
@@ -26,4 +26,4 @@ int inter_party_charname_changed(int party_id, uint32 char_id, char *name);
 int inter_party_CharOnline(uint32 char_id, int party_id);
 int inter_party_CharOffline(uint32 char_id, int party_id);
 
-#endif /* _INT_PARTY_SQL_H_ */
+#endif /* _INT_PARTY_HPP_ */

+ 0 - 1
src/char/int_pet.cpp

@@ -17,7 +17,6 @@
 #include "char.hpp"
 #include "inter.hpp"
 
-
 struct s_pet *pet_pt;
 
 //---------------------------------------------------------

+ 3 - 5
src/char/int_pet.hpp

@@ -1,8 +1,8 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#ifndef _INT_PET_SQL_H_
-#define _INT_PET_SQL_H_
+#ifndef _INT_PET_HPP_
+#define _INT_PET_HPP_
 
 #include "../common/cbasetypes.h"
 
@@ -19,6 +19,4 @@ int inter_pet_sql_init(void);
 
 int inter_pet_tosql(int pet_id, struct s_pet *p);
 
-
-
-#endif /* _INT_PET_SQL_H_ */
+#endif /* _INT_PET_HPP_ */

+ 3 - 7
src/char/int_quest.hpp

@@ -1,14 +1,10 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#ifndef _QUEST_H_
-#define _QUEST_H_
-
-
+#ifndef _INT_QUEST_HPP_
+#define _INT_QUEST_HPP_
 
 int inter_quest_parse_frommap(int fd);
 
-
-
-#endif
+#endif /* _INT_QUEST_HPP_ */
 

+ 0 - 3
src/char/int_storage.cpp

@@ -2,13 +2,10 @@
 // For more information, see LICENCE in the main folder
 
 #pragma warning(disable:4800) //forcing value to bool
-
 #include "int_storage.hpp"
 
 #include <stdlib.h>
 #include <string.h>
-//#include <string>
-
 
 #include "../common/malloc.h"
 #include "../common/mmo.h"

+ 3 - 5
src/char/int_storage.hpp

@@ -1,12 +1,11 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#ifndef _INT_STORAGE_SQL_H_
-#define _INT_STORAGE_SQL_H_
+#ifndef _INT_STORAGE_HPP_
+#define _INT_STORAGE_HPP_
 
 #include "../common/cbasetypes.h"
 
-
 struct s_storage;
 
 void inter_storage_sql_init(void);
@@ -21,5 +20,4 @@ bool inter_storage_parse_frommap(int fd);
 
 bool guild_storage_tosql(int guild_id, struct s_storage *p);
 
-
-#endif /* _INT_STORAGE_SQL_H_ */
+#endif /* _INT_STORAGE_HPP_ */

+ 0 - 3
src/char/inter.cpp

@@ -5,10 +5,8 @@
 
 #include <string.h>
 #include <stdlib.h>
-
 #include <sys/stat.h> // for stat/lstat/fstat - [Dekamaster/Ultimate GM Tool]
 #include <yaml-cpp/yaml.h>
-
 #include <string>
 #include <vector>
 #include <stdlib.h>
@@ -37,7 +35,6 @@
 #include "int_clan.hpp"
 #include "int_achievement.hpp"
 
-
 #define WISDATA_TTL (60*1000)	//Wis data Time To Live (60 seconds)
 #define WISDELLIST_MAX 256		// Number of elements in the list Delete data Wis
 

+ 3 - 7
src/char/inter.hpp

@@ -1,19 +1,16 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#ifndef _INTER_SQL_H_
-#define _INTER_SQL_H_
+#ifndef _INTER_HPP_
+#define _INTER_HPP_
 
 #include "../common/cbasetypes.h"
-//#include "../common/conf.h"
-//#include "../common/mmo.h"
 #include "../common/sql.h"
 
 #include <memory>
 #include <string>
 #include <unordered_map>
 
-
 struct s_storage_table;
 struct Inter_Config {
 	std::string cfgFile; ///< Inter-Config file
@@ -43,5 +40,4 @@ extern Sql* lsql_handle;
 void inter_savereg(uint32 account_id, uint32 char_id, const char *key, unsigned int index, intptr_t val, bool is_string);
 int inter_accreg_fromsql(uint32 account_id, uint32 char_id, int fd, int type);
 
-
-#endif /* _INTER_SQL_H_ */
+#endif /* _INTER_HPP_ */

+ 3 - 3
src/map/achievement.hpp

@@ -1,8 +1,8 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#ifndef ACHIEVEMENT_HPP_
-#define ACHIEVEMENT_HPP_
+#ifndef _ACHIEVEMENT_HPP_
+#define _ACHIEVEMENT_HPP_
 
 #include "../common/mmo.h"
 #include "../common/db.h"
@@ -122,4 +122,4 @@ const char *av_parse_simpleexpr(const char *p, struct av_condition *parent);
 long long achievement_check_condition(struct av_condition *condition, struct map_session_data *sd, int *count);
 void achievement_script_free(struct av_condition *condition);
 
-#endif /* ACHIEVEMENT_HPP_ */
+#endif /* _ACHIEVEMENT_HPP_ */

+ 1 - 0
src/map/atcommand.hpp

@@ -44,4 +44,5 @@ struct atcmd_binding_data {
 };
 extern struct atcmd_binding_data** atcmd_binding;
 struct atcmd_binding_data* get_atcommandbind_byname(const char* name);
+
 #endif /* _ATCOMMAND_HPP_ */

+ 2 - 1
src/map/clif.hpp

@@ -4,6 +4,8 @@
 #ifndef _CLIF_HPP_
 #define _CLIF_HPP_
 
+#include <stdarg.h>
+
 #include "../common/cbasetypes.h"
 #include "../common/db.h" //dbmap
 #include "../common/mmo.h"
@@ -33,7 +35,6 @@ struct party_booking_ad_info;
 struct sale_item_data;
 struct mail_message;
 struct achievement;
-#include <stdarg.h>
 
 enum e_PacketDBVersion { // packet DB
 	MIN_PACKET_DB  = 0x064,

+ 1 - 1
src/map/instance.hpp

@@ -99,4 +99,4 @@ void do_final_instance(void);
 	#error Too many maps per instance defined! Please adjust MAX_MAP_PER_INSTANCE to a lower value.
 #endif
 
-#endif
+#endif /* _INSTANCE_HPP_ */

+ 0 - 1
src/map/path.hpp

@@ -72,5 +72,4 @@ int distance_client(int dx, int dy);
 void do_init_path();
 void do_final_path();
 
-
 #endif /* _PATH_HPP_ */

+ 1 - 0
src/map/pc.hpp

@@ -1329,4 +1329,5 @@ bool pc_job_can_entermap(enum e_job jobid, int m, int group_lv);
 #if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
 int pc_level_penalty_mod(int level_diff, uint32 mob_class, enum e_mode mode, int type);
 #endif
+
 #endif /* _PC_HPP_ */

+ 1 - 1
src/map/quest.hpp

@@ -63,4 +63,4 @@ void do_init_quest(void);
 void do_final_quest(void);
 void do_reload_quest(void);
 
-#endif
+#endif /* _QUEST_HPP_ */

+ 1 - 1
src/map/searchstore.hpp

@@ -56,4 +56,4 @@ bool searchstore_queryremote(struct map_session_data* sd, uint32 account_id);
 void searchstore_clearremote(struct map_session_data* sd);
 bool searchstore_result(struct map_session_data* sd, int store_id, uint32 account_id, const char* store_name, unsigned short nameid, unsigned short amount, unsigned int price, const unsigned short* card, unsigned char refine);
 
-#endif  // _SEARCHSTORE_HPP_
+#endif /* _SEARCHSTORE_HPP_ */

+ 0 - 1
src/map/unit.hpp

@@ -169,5 +169,4 @@ int unit_changetarget(struct block_list *bl,va_list ap);
 void do_init_unit(void);
 void do_final_unit(void);
 
-
 #endif /* _UNIT_HPP_ */