Convert sourcedb to new LuaStack stuff

This commit is contained in:
2023-04-07 15:49:50 -04:00
parent 4f0713c9cb
commit 9d593cc767
3 changed files with 81 additions and 77 deletions

View File

@@ -361,14 +361,14 @@ public:
// send_to_stream: send all arguments to the specified stream.
inline void send_to_stream(std::ostream &os) {}
template <class ARG, class... REST>
template <typename ARG, typename... REST>
inline void send_to_stream(std::ostream &os, const ARG &arg, const REST & ... rest) {
os << arg;
send_to_stream(os, rest...);
}
// ss: convert all arguments to a string by sending them to a stringstream.
template <class... ARGS>
template <typename... ARGS>
inline eng::string ss(const ARGS & ... args) {
eng::ostringstream oss;
send_to_stream(oss, args...);
@@ -390,7 +390,7 @@ void dprintview(std::string_view view);
void dprintf(const char *format, ...);
void hook_dprint(void (*func)(const char *oneline, size_t size));
template <class... ARGS>
template <typename... ARGS>
inline void dprint(const ARGS & ... args) {
util::ostringstream oss;
send_to_stream(oss, args...);