Replace all include guards by #pragma once

It’s $CURRENT_YEAR
This commit is contained in:
louiz’
2016-07-04 17:53:53 +02:00
parent 5321d29cbd
commit 81f8f45b37
40 changed files with 101 additions and 124 deletions
+3 -3
View File
@@ -13,8 +13,8 @@
* save the config into the file. * save the config into the file.
*/ */
#ifndef CONFIG_INCLUDED #pragma once
# define CONFIG_INCLUDED
#include <functional> #include <functional>
#include <fstream> #include <fstream>
@@ -91,4 +91,4 @@ private:
}; };
#endif // CONFIG_INCLUDED
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef LOGGER_INCLUDED #pragma once
# define LOGGER_INCLUDED
/** /**
* Singleton used in logger macros to write into files or stdout, with * Singleton used in logger macros to write into files or stdout, with
@@ -123,4 +123,4 @@ namespace logging_details
#define log_debug(...) logging_details::log_debug(WHERE, __VA_ARGS__) #define log_debug(...) logging_details::log_debug(WHERE, __VA_ARGS__)
#endif // LOGGER_INCLUDED
+2 -3
View File
@@ -1,5 +1,4 @@
#ifndef BIBOUMI_CREDENTIALS_MANAGER_HPP #pragma once
#define BIBOUMI_CREDENTIALS_MANAGER_HPP
#include "louloulibs.h" #include "louloulibs.h"
@@ -37,4 +36,4 @@ private:
}; };
#endif //BOTAN_FOUND #endif //BOTAN_FOUND
#endif //BIBOUMI_CREDENTIALS_MANAGER_HPP
+1 -3
View File
@@ -1,5 +1,4 @@
#ifndef DNS_HANDLER_HPP_INCLUDED #pragma once
#define DNS_HANDLER_HPP_INCLUDED
#include <louloulibs.h> #include <louloulibs.h>
#ifdef CARES_FOUND #ifdef CARES_FOUND
@@ -56,4 +55,3 @@ private:
}; };
#endif /* CARES_FOUND */ #endif /* CARES_FOUND */
#endif /* DNS_HANDLER_HPP_INCLUDED */
+1 -3
View File
@@ -1,5 +1,4 @@
#ifndef DNS_SOCKET_HANDLER_HPP #pragma once
# define DNS_SOCKET_HANDLER_HPP
#include <louloulibs.h> #include <louloulibs.h>
#ifdef CARES_FOUND #ifdef CARES_FOUND
@@ -44,4 +43,3 @@ private:
}; };
#endif // CARES_FOUND #endif // CARES_FOUND
#endif // DNS_SOCKET_HANDLER_HPP
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef POLLER_INCLUDED #pragma once
# define POLLER_INCLUDED
#include <network/socket_handler.hpp> #include <network/socket_handler.hpp>
@@ -91,4 +91,4 @@ private:
#endif #endif
}; };
#endif // POLLER_INCLUDED
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef RESOLVER_HPP_INCLUDED #pragma once
#define RESOLVER_HPP_INCLUDED
#include "louloulibs.h" #include "louloulibs.h"
@@ -125,4 +125,4 @@ private:
std::string addr_to_string(const struct addrinfo* rp); std::string addr_to_string(const struct addrinfo* rp);
#endif /* RESOLVER_HPP_INCLUDED */
+1 -3
View File
@@ -1,5 +1,4 @@
#ifndef SOCKET_HANDLER_HPP #pragma once
# define SOCKET_HANDLER_HPP
#include <louloulibs.h> #include <louloulibs.h>
#include <memory> #include <memory>
@@ -41,4 +40,3 @@ protected:
socket_t socket; socket_t socket;
}; };
#endif // SOCKET_HANDLER_HPP
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef SOCKET_HANDLER_INCLUDED #pragma once
# define SOCKET_HANDLER_INCLUDED
#include "louloulibs.h" #include "louloulibs.h"
@@ -270,5 +270,5 @@ private:
#endif // BOTAN_FOUND #endif // BOTAN_FOUND
}; };
#endif // SOCKET_HANDLER_INCLUDED
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef ENCODING_INCLUDED #pragma once
# define ENCODING_INCLUDED
#include <string> #include <string>
@@ -40,4 +40,4 @@ namespace xep0106
void encode(std::string&); void encode(std::string&);
} }
#endif // ENCODING_INCLUDED
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef RELOAD_HPP_INCLUDED #pragma once
#define RELOAD_HPP_INCLUDED
/** /**
* Reload the server's configuration, and close the logger (so that it * Reload the server's configuration, and close the logger (so that it
@@ -7,4 +7,4 @@
*/ */
void reload_process(); void reload_process();
#endif /* RELOAD_HPP_INCLUDED */
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef REVSTR_HPP_INCLUDED #pragma once
# define REVSTR_HPP_INCLUDED
#include <string> #include <string>
@@ -8,4 +8,4 @@ namespace utils
std::string revstr(const std::string& original); std::string revstr(const std::string& original);
} }
#endif // REVSTR_HPP_INCLUDED
+1 -3
View File
@@ -1,5 +1,4 @@
#ifndef SCOPEGUARD_HPP #pragma once
#define SCOPEGUARD_HPP
#include <functional> #include <functional>
#include <vector> #include <vector>
@@ -88,4 +87,3 @@ private:
} }
#endif
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef SPLIT_INCLUDED #pragma once
# define SPLIT_INCLUDED
#include <string> #include <string>
#include <vector> #include <vector>
@@ -9,4 +9,4 @@ namespace utils
std::vector<std::string> split(const std::string &s, const char delim, const bool allow_empty=true); std::vector<std::string> split(const std::string &s, const char delim, const bool allow_empty=true);
} }
#endif // SPLIT_INCLUDED
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef STRING_UTILS_HPP_INCLUDED #pragma once
#define STRING_UTILS_HPP_INCLUDED
#include <vector> #include <vector>
#include <string> #include <string>
@@ -7,4 +7,4 @@
bool to_bool(const std::string& val); bool to_bool(const std::string& val);
std::vector<std::string> cut(const std::string& val, const std::size_t size); std::vector<std::string> cut(const std::string& val, const std::size_t size);
#endif /* STRING_UTILS_HPP_INCLUDED */
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef TIMED_EVENTS_HPP #pragma once
# define TIMED_EVENTS_HPP
#include <functional> #include <functional>
#include <string> #include <string>
@@ -131,5 +130,3 @@ private:
std::vector<TimedEvent> events; std::vector<TimedEvent> events;
explicit TimedEventsManager() = default; explicit TimedEventsManager() = default;
}; };
#endif // TIMED_EVENTS_HPP
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef TOLOWER_INCLUDED #pragma once
# define TOLOWER_INCLUDED
#include <string> #include <string>
@@ -8,4 +8,4 @@ namespace utils
std::string tolower(const std::string& original); std::string tolower(const std::string& original);
} }
#endif // SPLIT_INCLUDED
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef XDG_HPP_INCLUDED #pragma once
#define XDG_HPP_INCLUDED
#include <string> #include <string>
@@ -11,4 +11,4 @@
std::string xdg_config_path(const std::string& filename); std::string xdg_config_path(const std::string& filename);
std::string xdg_data_path(const std::string& filename); std::string xdg_data_path(const std::string& filename);
#endif /* XDG_HPP_INCLUDED */
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef ADHOC_COMMAND_HPP #pragma once
# define ADHOC_COMMAND_HPP
/** /**
* Describe an ad-hoc command. * Describe an ad-hoc command.
@@ -43,5 +42,3 @@ void PingStep1(XmppComponent&, AdhocSession& session, XmlNode& command_node);
void HelloStep1(XmppComponent&, AdhocSession& session, XmlNode& command_node); void HelloStep1(XmppComponent&, AdhocSession& session, XmlNode& command_node);
void HelloStep2(XmppComponent&, AdhocSession& session, XmlNode& command_node); void HelloStep2(XmppComponent&, AdhocSession& session, XmlNode& command_node);
void Reload(XmppComponent&, AdhocSession& session, XmlNode& command_node); void Reload(XmppComponent&, AdhocSession& session, XmlNode& command_node);
#endif // ADHOC_COMMAND_HPP
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef ADHOC_COMMANDS_HANDLER_HPP #pragma once
# define ADHOC_COMMANDS_HANDLER_HPP
/** /**
* Manage a list of available AdhocCommands and the list of ongoing * Manage a list of available AdhocCommands and the list of ongoing
@@ -70,5 +69,3 @@ private:
*/ */
std::map<std::pair<const std::string, const std::string>, AdhocSession> sessions; std::map<std::pair<const std::string, const std::string>, AdhocSession> sessions;
}; };
#endif // ADHOC_COMMANDS_HANDLER_HPP
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef ADHOC_SESSION_HPP #pragma once
# define ADHOC_SESSION_HPP
#include <xmpp/xmpp_stanza.hpp> #include <xmpp/xmpp_stanza.hpp>
@@ -87,5 +86,3 @@ public:
*/ */
std::map<std::string, std::string> vars; std::map<std::string, std::string> vars;
}; };
#endif // ADHOC_SESSION_HPP
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef XMPP_BODY_HPP_INCLUDED #pragma once
#define XMPP_BODY_HPP_INCLUDED
namespace Xmpp namespace Xmpp
{ {
@@ -9,4 +9,4 @@ namespace Xmpp
using body = std::tuple<const std::string, std::unique_ptr<XmlNode>>; using body = std::tuple<const std::string, std::unique_ptr<XmlNode>>;
} }
#endif /* XMPP_BODY_HPP_INCLUDED */
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef JID_INCLUDED #pragma once
# define JID_INCLUDED
#include <string> #include <string>
@@ -41,4 +41,4 @@ public:
*/ */
std::string jidprep(const std::string& original); std::string jidprep(const std::string& original);
#endif // JID_INCLUDED
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef ROSTER_HPP_INCLUDED #pragma once
#define ROSTER_HPP_INCLUDED
#include <algorithm> #include <algorithm>
#include <string> #include <string>
@@ -68,4 +68,4 @@ private:
Roster& operator=(Roster&&) = delete; Roster& operator=(Roster&&) = delete;
}; };
#endif /* ROSTER_HPP_INCLUDED */
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef XMPP_COMPONENT_INCLUDED #pragma once
# define XMPP_COMPONENT_INCLUDED
#include <xmpp/adhoc_commands_handler.hpp> #include <xmpp/adhoc_commands_handler.hpp>
#include <network/tcp_socket_handler.hpp> #include <network/tcp_socket_handler.hpp>
@@ -240,4 +240,4 @@ protected:
AdhocCommandsHandler adhoc_commands_handler; AdhocCommandsHandler adhoc_commands_handler;
}; };
#endif // XMPP_COMPONENT_INCLUDED
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef XMPP_PARSER_INCLUDED #pragma once
# define XMPP_PARSER_INCLUDED
#include <xmpp/xmpp_stanza.hpp> #include <xmpp/xmpp_stanza.hpp>
@@ -130,4 +130,4 @@ private:
std::vector<std::function<void(const XmlNode&)>> stream_close_callbacks; std::vector<std::function<void(const XmlNode&)>> stream_close_callbacks;
}; };
#endif // XMPP_PARSER_INCLUDED
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef XMPP_STANZA_INCLUDED #pragma once
# define XMPP_STANZA_INCLUDED
#include <map> #include <map>
#include <string> #include <string>
@@ -143,4 +143,4 @@ std::ostream& operator<<(std::ostream& os, const XmlNode& node);
*/ */
using Stanza = XmlNode; using Stanza = XmlNode;
#endif // XMPP_STANZA_INCLUDED
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef BRIDGE_INCLUDED #pragma once
# define BRIDGE_INCLUDED
#include <irc/irc_message.hpp> #include <irc/irc_message.hpp>
#include <irc/irc_client.hpp> #include <irc/irc_client.hpp>
@@ -290,4 +290,4 @@ struct IRCNotConnected: public std::exception
const std::string hostname; const std::string hostname;
}; };
#endif // BRIDGE_INCLUDED
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef COLORS_INCLUDED #pragma once
# define COLORS_INCLUDED
/** /**
* A module handling the conversion between IRC colors and XHTML-IM, and * A module handling the conversion between IRC colors and XHTML-IM, and
@@ -53,4 +53,4 @@ static const char irc_format_char[] = {
*/ */
Xmpp::body irc_format_to_xhtmlim(const std::string& str); Xmpp::body irc_format_to_xhtmlim(const std::string& str);
#endif // COLORS_INCLUDED
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef LIST_ELEMENT_HPP_INCLUDED #pragma once
#define LIST_ELEMENT_HPP_INCLUDED
#include <string> #include <string>
@@ -16,4 +16,4 @@ struct ListElement
std::string topic; std::string topic;
}; };
#endif /* LIST_ELEMENT_HPP_INCLUDED */
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef DATABASE_HPP_INCLUDED #pragma once
#define DATABASE_HPP_INCLUDED
#include <biboumi.h> #include <biboumi.h>
#ifdef USE_DATABASE #ifdef USE_DATABASE
@@ -50,4 +50,4 @@ private:
}; };
#endif /* USE_DATABASE */ #endif /* USE_DATABASE */
#endif /* DATABASE_HPP_INCLUDED */
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef IID_INCLUDED #pragma once
# define IID_INCLUDED
#include <string> #include <string>
@@ -76,4 +76,4 @@ namespace std {
const std::string to_string(const Iid& iid); const std::string to_string(const Iid& iid);
} }
#endif // IID_INCLUDED
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef IRC_CHANNEL_INCLUDED #pragma once
# define IRC_CHANNEL_INCLUDED
#include <irc/irc_user.hpp> #include <irc/irc_user.hpp>
#include <memory> #include <memory>
@@ -67,4 +67,4 @@ public:
bool joining; bool joining;
}; };
#endif // IRC_CHANNEL_INCLUDED
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef IRC_CLIENT_INCLUDED #pragma once
# define IRC_CLIENT_INCLUDED
#include <irc/irc_message.hpp> #include <irc/irc_message.hpp>
#include <irc/irc_channel.hpp> #include <irc/irc_channel.hpp>
@@ -380,4 +380,4 @@ private:
Resolver dns_resolver; Resolver dns_resolver;
}; };
#endif // IRC_CLIENT_INCLUDED
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef IRC_MESSAGE_INCLUDED #pragma once
# define IRC_MESSAGE_INCLUDED
#include <vector> #include <vector>
#include <string> #include <string>
@@ -25,4 +25,4 @@ public:
std::ostream& operator<<(std::ostream& os, const IrcMessage& message); std::ostream& operator<<(std::ostream& os, const IrcMessage& message);
#endif // IRC_MESSAGE_INCLUDED
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef IRC_USER_INCLUDED #pragma once
# define IRC_USER_INCLUDED
#include <vector> #include <vector>
#include <string> #include <string>
@@ -30,4 +30,4 @@ public:
std::set<char> modes; std::set<char> modes;
}; };
#endif // IRC_USER_INCLUDED
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef EMPTY_IF_FIXED_SERVER_HPP_INCLUDED #pragma once
#define EMPTY_IF_FIXED_SERVER_HPP_INCLUDED
#include <string> #include <string>
@@ -23,4 +23,4 @@ namespace utils
} }
#endif /* EMPTY_IF_FIXED_SERVER_HPP_INCLUDED */
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef BIBOUMI_ADHOC_COMMANDS_HPP_INCLUDED #pragma once
#define BIBOUMI_ADHOC_COMMANDS_HPP_INCLUDED
#include <xmpp/adhoc_command.hpp> #include <xmpp/adhoc_command.hpp>
#include <xmpp/adhoc_session.hpp> #include <xmpp/adhoc_session.hpp>
@@ -20,4 +20,4 @@ void DisconnectUserFromServerStep1(XmppComponent&, AdhocSession& session, XmlNod
void DisconnectUserFromServerStep2(XmppComponent&, AdhocSession& session, XmlNode& command_node); void DisconnectUserFromServerStep2(XmppComponent&, AdhocSession& session, XmlNode& command_node);
void DisconnectUserFromServerStep3(XmppComponent&, AdhocSession& session, XmlNode& command_node); void DisconnectUserFromServerStep3(XmppComponent&, AdhocSession& session, XmlNode& command_node);
#endif /* BIBOUMI_ADHOC_COMMANDS_HPP_INCLUDED */
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef BIBOUMI_COMPONENT_INCLUDED #pragma once
# define BIBOUMI_COMPONENT_INCLUDED
#include <xmpp/xmpp_component.hpp> #include <xmpp/xmpp_component.hpp>
@@ -106,4 +106,4 @@ private:
AdhocCommandsHandler irc_channel_adhoc_commands_handler; AdhocCommandsHandler irc_channel_adhoc_commands_handler;
}; };
#endif // BIBOUMI_COMPONENT_INCLUDED
+1 -3
View File
@@ -1,5 +1,4 @@
#ifndef BIBOUMI_IO_TESTER_HPP #pragma once
#define BIBOUMI_IO_TESTER_HPP
#include <ostream> #include <ostream>
#include <sstream> #include <sstream>
@@ -44,4 +43,3 @@ private:
std::streambuf* const old_buf; std::streambuf* const old_buf;
}; };
#endif //BIBOUMI_IO_TESTER_HPP