mirror of
https://github.com/edubart/otclient.git
synced 2025-12-14 04:49:45 +01:00
More refactoring and some changes
* Move protocol safeSend() to send() * Bind some new functions * Refactor lots of enums
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
#include <iomanip>
|
||||
#include <vector>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <otclient/position.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "cast.h"
|
||||
@@ -53,7 +52,7 @@ typename std::enable_if<std::is_integral<T>::value ||
|
||||
std::is_floating_point<T>::value ||
|
||||
std::is_enum<T>::value, T>::type sprintf_cast(const T& t) { return t; }
|
||||
|
||||
/// Cast any class or struct convertible to std::string
|
||||
/// Cast std::string
|
||||
inline const char *sprintf_cast(const std::string& s) { return s.c_str(); }
|
||||
|
||||
template<int N>
|
||||
@@ -181,11 +180,6 @@ inline std::string ip_to_string(uint32 ip) {
|
||||
return std::string(host);
|
||||
}
|
||||
|
||||
inline std::string pos_to_string(const Position& p)
|
||||
{
|
||||
return format("{x = %hd, y = %hd, z = %hd}", p.x, p.y, p.z);
|
||||
}
|
||||
|
||||
/// Convert utf8 characters to latin1
|
||||
inline char utf8CharToLatin1(uchar *utf8, int *read) {
|
||||
char c = '?';
|
||||
|
||||
Reference in New Issue
Block a user