Convert to pragma once
This commit is contained in:
@@ -107,8 +107,7 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ANIMQUEUE_HPP
|
||||
#define ANIMQUEUE_HPP
|
||||
#pragma once
|
||||
|
||||
#include "wrap-set.hpp"
|
||||
#include "wrap-string.hpp"
|
||||
@@ -431,5 +430,4 @@ private:
|
||||
static util::SharedStdString blankqueue_;
|
||||
};
|
||||
|
||||
#endif // ANIMQUEUE_HPP
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef DEBUGCOLLECTOR_HPP
|
||||
#define DEBUGCOLLECTOR_HPP
|
||||
#pragma once
|
||||
|
||||
#include "wrap-vector.hpp"
|
||||
#include "wrap-string.hpp"
|
||||
@@ -47,5 +46,4 @@ public:
|
||||
#define DebugHeader(dbc) if (((dbc)!=nullptr) && (dbc)->do_header()) ((dbc)->oss_)
|
||||
#define DebugLine(dbc) if (((dbc)!=nullptr) && (dbc)->do_line()) ((dbc)->oss_)
|
||||
|
||||
#endif // DEBUGCOLLECTOR_HPP
|
||||
|
||||
|
||||
@@ -39,8 +39,7 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef DRIVENENGINE_HPP
|
||||
#define DRIVENENGINE_HPP
|
||||
#pragma once
|
||||
|
||||
#include "wrap-string.hpp"
|
||||
#include "wrap-vector.hpp"
|
||||
@@ -325,6 +324,3 @@ struct DrivenEngineInitializerReg {
|
||||
static DrivenEngineInitializer func;
|
||||
DrivenEngineInitializerReg(DrivenEngineInitializer f);
|
||||
};
|
||||
|
||||
|
||||
#endif // DRIVENENGINE_HPP
|
||||
|
||||
@@ -59,8 +59,7 @@
|
||||
// data goes into the malloc heap. By the way, eng::ostringstream uses
|
||||
// the eng::malloc heap.
|
||||
//
|
||||
#ifndef ENG_MALLOC_HPP
|
||||
#define ENG_MALLOC_HPP
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
@@ -207,5 +206,3 @@ namespace eng {
|
||||
}
|
||||
} // namespace eng
|
||||
|
||||
#endif // ENG_MALLOC_HPP
|
||||
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ENGINEWRAPPER_H
|
||||
#define ENGINEWRAPPER_H
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
@@ -305,5 +304,3 @@ struct EngineWrapper {
|
||||
//
|
||||
void (*release)(EngineWrapper *w);
|
||||
};
|
||||
|
||||
#endif // ENGINEWRAPPER_HPP
|
||||
@@ -10,8 +10,7 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef HTTP_HPP
|
||||
#define HTTP_HPP
|
||||
#pragma once
|
||||
|
||||
#include "eng-malloc.hpp"
|
||||
#include "wrap-string.hpp"
|
||||
@@ -454,5 +453,3 @@ public:
|
||||
|
||||
using HttpChannelMap = eng::map<int64_t, HttpChannel>;
|
||||
using HttpChannelVec = eng::vector<HttpChannel>;
|
||||
|
||||
#endif // HTTP_HPP
|
||||
|
||||
@@ -90,8 +90,7 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef IDALLOC_HPP
|
||||
#define IDALLOC_HPP
|
||||
#pragma once
|
||||
|
||||
#include "wrap-map.hpp"
|
||||
#include "wrap-sstream.hpp"
|
||||
@@ -219,5 +218,4 @@ private:
|
||||
friend int lfn_unittests_idalloc(lua_State *L);
|
||||
};
|
||||
|
||||
#endif // IDALLOC_HPP
|
||||
|
||||
|
||||
@@ -35,8 +35,7 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef INVOCATION_HPP
|
||||
#define INVOCATION_HPP
|
||||
#pragma once
|
||||
|
||||
#include "wrap-string.hpp"
|
||||
#include "wrap-map.hpp"
|
||||
@@ -72,6 +71,3 @@ using UniqueInvocation = std::unique_ptr<Invocation>;
|
||||
|
||||
class InvocationQueue : public eng::deque<Invocation> {
|
||||
};
|
||||
|
||||
|
||||
#endif // INVOCATION_HPP
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
//
|
||||
// See the doc(http.jsonencode) to read about limitations of the encoder.
|
||||
//
|
||||
#ifndef JSON_HPP
|
||||
#define JSON_HPP
|
||||
#pragma once
|
||||
|
||||
#include "luastack.hpp"
|
||||
#include "wrap-string.hpp"
|
||||
@@ -30,5 +29,4 @@ namespace json {
|
||||
bool decode(LuaCoreStack &LS, LuaSlot out, std::string_view in);
|
||||
}
|
||||
|
||||
#endif // JSON_HPP
|
||||
|
||||
|
||||
@@ -40,8 +40,7 @@
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef KEYWORDS_HPP
|
||||
#define KEYWORDS_HPP
|
||||
#pragma once
|
||||
|
||||
#include "luastack.hpp"
|
||||
|
||||
@@ -88,5 +87,3 @@ public:
|
||||
// Fetch the state pointer.
|
||||
lua_State *state() const { return LS.state(); }
|
||||
};
|
||||
|
||||
#endif // KEYWORDS_HPP
|
||||
|
||||
@@ -1,4 +1 @@
|
||||
#ifndef LPXCLIENT_HPP
|
||||
#define LPXCLIENT_HPP
|
||||
|
||||
#endif // LPXCLIENT_HPP
|
||||
#pragma once
|
||||
|
||||
@@ -1,5 +1,2 @@
|
||||
#ifndef LPXSERVER_HPP
|
||||
#define LPXSERVER_HPP
|
||||
|
||||
#endif // LPXSERVER_HPP
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LUASNAP_HPP
|
||||
#define LUASNAP_HPP
|
||||
#pragma once
|
||||
|
||||
#include "streambuffer.hpp"
|
||||
#include "luastack.hpp"
|
||||
@@ -37,6 +36,3 @@ public:
|
||||
//
|
||||
void deserialize(StreamBuffer *sb);
|
||||
};
|
||||
|
||||
|
||||
#endif // LUASNAP_HPP
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LUASTACK_HPP
|
||||
#define LUASTACK_HPP
|
||||
#pragma once
|
||||
|
||||
#include "util.hpp"
|
||||
#include "wrap-string.hpp"
|
||||
@@ -946,5 +945,3 @@ public:
|
||||
#define LuaStringify(x) #x
|
||||
#define LuaAssert(L, x) if (!(x)) { luaL_error((L), "Assert failed: %s (file %s line %d)", LuaStringify(x), __FILE__, __LINE__); }
|
||||
#define LuaAssertStrEq(L, x, y) { eng::string _s1_(x); eng::string _s2_(y); if (_s1_ != _s2_) luaL_error((L), "Assert failed: value=%s (file %s line %d)", _s1_.c_str(), __FILE__, __LINE__); }
|
||||
|
||||
#endif // LUASTACK_HPP
|
||||
|
||||
@@ -70,8 +70,7 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef PLANEMAP_HPP
|
||||
#define PLANEMAP_HPP
|
||||
#pragma once
|
||||
|
||||
#include "wrap-vector.hpp"
|
||||
#include "wrap-map.hpp"
|
||||
@@ -256,6 +255,3 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#endif // PLANEMAP_HPP
|
||||
|
||||
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef PPRINT_HPP
|
||||
#define PPRINT_HPP
|
||||
#pragma once
|
||||
|
||||
#include "luastack.hpp"
|
||||
#include <ostream>
|
||||
@@ -89,5 +88,3 @@ public:
|
||||
|
||||
friend class PrintMachine;
|
||||
};
|
||||
|
||||
#endif // PPRINT_HPP
|
||||
@@ -74,8 +74,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef PRINTBUFFER_HPP
|
||||
#define PRINTBUFFER_HPP
|
||||
#pragma once
|
||||
|
||||
#include "wrap-deque.hpp"
|
||||
#include "wrap-string.hpp"
|
||||
@@ -183,6 +182,3 @@ public:
|
||||
Invocation invocation(int64_t actor_id);
|
||||
};
|
||||
|
||||
|
||||
#endif // PRINTBUFFER_HPP
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef SCHED_HPP
|
||||
#define SCHED_HPP
|
||||
#pragma once
|
||||
|
||||
#include "wrap-set.hpp"
|
||||
|
||||
@@ -44,5 +43,4 @@ public:
|
||||
void deserialize(StreamBuffer *sb);
|
||||
};
|
||||
|
||||
#endif // SCHED_HPP
|
||||
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef SERIALIZELUA_HPP
|
||||
#define SERIALIZELUA_HPP
|
||||
#pragma once
|
||||
|
||||
#include "luastack.hpp"
|
||||
#include "streambuffer.hpp"
|
||||
@@ -36,5 +35,3 @@ eng::string serialize_lua(LuaCoreStack &LS0, LuaSlot val, StreamBuffer *sb);
|
||||
// streambuffer is likely only partially consumed.
|
||||
//
|
||||
eng::string deserialize_lua(LuaCoreStack &LS0, LuaSlot val, StreamBuffer *sb);
|
||||
|
||||
#endif // SERIALIZELUA_HPP
|
||||
|
||||
@@ -115,8 +115,7 @@
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef SOURCE_HPP
|
||||
#define SOURCE_HPP
|
||||
#pragma once
|
||||
|
||||
#include "wrap-string.hpp"
|
||||
|
||||
@@ -213,6 +212,5 @@ public:
|
||||
static void deserialize_source(util::LuaSourceVec *sv, StreamBuffer *sb);
|
||||
};
|
||||
|
||||
#endif // SOURCE_HPP
|
||||
|
||||
|
||||
|
||||
@@ -26,8 +26,7 @@
|
||||
// slower than MD5.
|
||||
//
|
||||
|
||||
#ifndef SPOOKYV2_HPP
|
||||
#define SPOOKYV2_HPP
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
@@ -79,5 +78,3 @@ public:
|
||||
return hash1;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // SPOOKYV2_HPP
|
||||
|
||||
@@ -199,8 +199,7 @@
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef STREAMBUFFER_HPP
|
||||
#define STREAMBUFFER_HPP
|
||||
#pragma once
|
||||
|
||||
#include "wrap-string.hpp"
|
||||
#include "wrap-sstream.hpp"
|
||||
@@ -279,5 +278,3 @@ public:
|
||||
|
||||
// Use a streambuffer as a lua_writer.
|
||||
int lua_writer_into_streambuffer(lua_State *L, const void* bytes, size_t sz, void* sb);
|
||||
|
||||
#endif // STREAMBUFFER_HPP
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef TABLE_HPP
|
||||
#define TABLE_HPP
|
||||
#pragma once
|
||||
|
||||
#include "luastack.hpp"
|
||||
|
||||
@@ -24,6 +23,3 @@ bool table_equal(LuaCoreStack &LS0, LuaSlot tab1, LuaSlot tab2);
|
||||
// the pairs. Return true if all keys were sortable.
|
||||
//
|
||||
bool table_getpairs(LuaCoreStack &LS0, LuaSlot tab, LuaSlot pairs, bool sort);
|
||||
|
||||
|
||||
#endif // TABLE_HPP
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef TRACEBACK_HPP
|
||||
#define TRACEBACK_HPP
|
||||
#pragma once
|
||||
|
||||
#include "luastack.hpp"
|
||||
|
||||
@@ -29,5 +28,3 @@ int traceback_coroutine(lua_State *L);
|
||||
// not allowed, and does an assert-fail in that case.
|
||||
//
|
||||
eng::string traceback_pcall(lua_State *L, int narg, int nret);
|
||||
|
||||
#endif // TRACEBACK_HPP
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef UTIL_HPP
|
||||
#define UTIL_HPP
|
||||
#pragma once
|
||||
|
||||
#include "wrap-string.hpp"
|
||||
#include "wrap-set.hpp"
|
||||
@@ -556,5 +555,3 @@ inline std::ostream &operator<<(std::ostream &oss, const util::DXYZ &xyz) {
|
||||
oss << xyz.x << "," << xyz.y << "," << xyz.z;
|
||||
return oss;
|
||||
}
|
||||
|
||||
#endif // UTIL_HPP
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
|
||||
#ifndef WORLD_HPP
|
||||
#define WORLD_HPP
|
||||
#pragma once
|
||||
|
||||
#include "wrap-set.hpp"
|
||||
#include "wrap-unordered-map.hpp"
|
||||
@@ -715,6 +714,3 @@ private:
|
||||
};
|
||||
|
||||
using UniqueWorld = std::unique_ptr<World>;
|
||||
|
||||
|
||||
#endif // WORLD_HPP
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef WRAP_BYTELL_HASH_MAP_HPP
|
||||
#define WRAP_BYTELL_HASH_MAP_HPP
|
||||
#pragma once
|
||||
|
||||
#include "eng-malloc.hpp"
|
||||
#include "bytell-hash-map.hpp"
|
||||
@@ -10,5 +9,3 @@ class bytell_hash_map : public ska::bytell_hash_map<K, V, H, E, eng::allocator<s
|
||||
using ska::bytell_hash_map<K, V, H, E, eng::allocator<std::pair<const K, V>>>::bytell_hash_map;
|
||||
};
|
||||
} // namespace eng
|
||||
|
||||
#endif // WRAP_BYTELL_HASH_MAP_HPP
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef WRAP_DEQUE_HPP
|
||||
#define WRAP_DEQUE_HPP
|
||||
#pragma once
|
||||
|
||||
#include "eng-malloc.hpp"
|
||||
#include <deque>
|
||||
@@ -10,5 +9,3 @@ class deque : public std::deque<T, eng::allocator<T>>, public eng::opnew {
|
||||
using std::deque<T, eng::allocator<T>>::deque;
|
||||
};
|
||||
} // namespace eng
|
||||
|
||||
#endif // WRAP_DEQUE_HPP
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef WRAP_MAP_HPP
|
||||
#define WRAP_MAP_HPP
|
||||
#pragma once
|
||||
|
||||
#include "eng-malloc.hpp"
|
||||
#include <map>
|
||||
@@ -10,5 +9,3 @@ class map : public std::map<K, V, C, eng::allocator<std::pair<const K, V>>>, eng
|
||||
using std::map<K, V, C, eng::allocator<std::pair<const K, V>>>::map;
|
||||
};
|
||||
} // namespace eng
|
||||
|
||||
#endif // WRAP_MAP_HPP
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef WRAP_SET_HPP
|
||||
#define WRAP_SET_HPP
|
||||
#pragma once
|
||||
|
||||
#include "eng-malloc.hpp"
|
||||
#include <set>
|
||||
@@ -10,5 +9,3 @@ class set : public std::set<K, C, eng::allocator<K>>, public eng::opnew {
|
||||
using std::set<K, C, eng::allocator<K>>::set;
|
||||
};
|
||||
} // namespace eng
|
||||
|
||||
#endif // WRAP_SET_HPP
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef WRAP_SSTREAM_HPP
|
||||
#define WRAP_SSTREAM_HPP
|
||||
#pragma once
|
||||
|
||||
#include "eng-malloc.hpp"
|
||||
#include "wrap-string.hpp"
|
||||
@@ -16,5 +15,3 @@ class basic_ostringstream : public std::basic_ostringstream<C, T, eng::allocator
|
||||
using ostringstream = basic_ostringstream<char>;
|
||||
//using stringbuf = basic_stringbuf<char>;
|
||||
} // namespace eng
|
||||
|
||||
#endif // WRAP_SSTREAM_HPP
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef WRAP_STRING_HPP
|
||||
#define WRAP_STRING_HPP
|
||||
#pragma once
|
||||
|
||||
#include "eng-malloc.hpp"
|
||||
#include <string>
|
||||
@@ -11,5 +10,3 @@ using string = basic_string<char>;
|
||||
using u32string = basic_string<char32_t>;
|
||||
using u16string = basic_string<char16_t>;
|
||||
} // namespace eng
|
||||
|
||||
#endif // WRAP_STRING_HPP
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef WRAP_UNORDERED_MAP_HPP
|
||||
#define WRAP_UNORDERED_MAP_HPP
|
||||
#pragma once
|
||||
|
||||
#include "eng-malloc.hpp"
|
||||
#include <unordered_map>
|
||||
@@ -10,5 +9,3 @@ class unordered_map : public std::unordered_map<K, V, H, E, eng::allocator<std::
|
||||
using std::unordered_map<K, V, H, E, eng::allocator<std::pair<const K, V>>>::unordered_map;
|
||||
};
|
||||
} // namespace eng
|
||||
|
||||
#endif // WRAP_UNORDERED_MAP_HPP
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef WRAP_UNORDERED_SET_HPP
|
||||
#define WRAP_UNORDERED_SET_HPP
|
||||
#pragma once
|
||||
|
||||
#include "eng-malloc.hpp"
|
||||
#include <unordered_set>
|
||||
@@ -10,5 +9,3 @@ class unordered_set : public std::unordered_set<K, H, E, eng::allocator<K>>, pub
|
||||
using std::unordered_set<K, H, E, eng::allocator<K>>::unordered_set;
|
||||
};
|
||||
} // namespace eng
|
||||
|
||||
#endif // WRAP_UNORDERED_SET_HPP
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef WRAP_VECTOR_HPP
|
||||
#define WRAP_VECTOR_HPP
|
||||
#pragma once
|
||||
|
||||
#include "eng-malloc.hpp"
|
||||
#include <vector>
|
||||
@@ -10,5 +9,3 @@ class vector : public std::vector<T, eng::allocator<T>>, public eng::opnew {
|
||||
using std::vector<T, eng::allocator<T>>::vector;
|
||||
};
|
||||
} // namespace eng
|
||||
|
||||
#endif // WRAP_VECTOR_HPP
|
||||
|
||||
Reference in New Issue
Block a user