1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 08:13:12 +02:00

Fix Windows

This commit is contained in:
Adam
2013-05-05 03:01:54 -04:00
parent ee2dcf11b8
commit a118946e65
2 changed files with 17 additions and 10 deletions
+15 -8
View File
@@ -21,9 +21,9 @@
namespace Configuration
{
class Block
class CoreExport Block
{
friend class Conf;
friend struct Conf;
public:
typedef Anope::map<Anope::string> item_map;
@@ -40,7 +40,14 @@ namespace Configuration
int CountBlock(const Anope::string &name);
Block* GetBlock(const Anope::string &name, int num = 0);
template<typename T> T Get(const Anope::string &tag, const Anope::string &def = "") const
template<typename T> inline T Get(const Anope::string &tag)
{
return this->Get<T>(tag, "");
}
/* VS 2008 has an issue with having a default argument here (def = ""), which is why the above
* function exists.
*/
template<typename T> T Get(const Anope::string &tag, const Anope::string &def) const
{
const Anope::string &value = this->Get<const Anope::string &>(tag, def);
try
@@ -57,10 +64,10 @@ namespace Configuration
const item_map* GetItems() const;
};
template<> const Anope::string& Block::Get(const Anope::string &tag, const Anope::string& def) const;
template<> time_t Block::Get(const Anope::string &tag, const Anope::string &def) const;
template<> const char* Block::Get(const Anope::string &tag, const Anope::string &def) const;
template<> bool Block::Get(const Anope::string &tag, const Anope::string &def) const;
template<> CoreExport const Anope::string& Block::Get(const Anope::string &tag, const Anope::string& def) const;
template<> CoreExport time_t Block::Get(const Anope::string &tag, const Anope::string &def) const;
template<> CoreExport const char* Block::Get(const Anope::string &tag, const Anope::string &def) const;
template<> CoreExport bool Block::Get(const Anope::string &tag, const Anope::string &def) const;
/** Represents a configuration file
*/
@@ -83,7 +90,7 @@ namespace Configuration
struct Uplink;
struct Conf : Block
struct CoreExport Conf : Block
{
/* options:readtimeout */
time_t ReadTimeout;
+2 -2
View File
@@ -23,9 +23,9 @@ struct ChanUserContainer;
class ClientSocket;
class Command;
class CommandSource;
namespace Configuration { class Conf; }
namespace Configuration { struct Conf; }
class ConnectionSocket;
namespace DNS { class Query; }
namespace DNS { struct Query; }
class Entry;
class IdentifyRequest;
class InfoFormatter;