This commit is contained in:
aozhiwei 2022-12-27 08:30:18 +08:00
parent 11f2866ade
commit 399eed8bd8
3 changed files with 12 additions and 5 deletions

View File

@ -173,6 +173,7 @@ namespace a8
} }
b_edges.push_back(seg); b_edges.push_back(seg);
} }
#if 0
auto GetProjectionWithAxis = auto GetProjectionWithAxis =
[] (std::vector<a8::Vec2> vertices, a8::Vec2 axis) -> a8::Vec2 { [] (std::vector<a8::Vec2> vertices, a8::Vec2 axis) -> a8::Vec2 {
axis.Normalize(); axis.Normalize();
@ -182,6 +183,7 @@ namespace a8
} }
}; };
#endif
return false; return false;
} }
@ -207,7 +209,7 @@ namespace a8
if (distance > _max) { if (distance > _max) {
return false; return false;
} }
float angle = (a_pos - b_pos).CalcAngleEx(a8::Vec2::UP); //float angle = (a_pos - b_pos).CalcAngleEx(a8::Vec2::UP);
return false; return false;
} }

View File

@ -399,6 +399,10 @@ namespace a8
return strcmp(s1 ? s1 : "", s2 ? s2 : ""); return strcmp(s1 ? s1 : "", s2 ? s2 : "");
} }
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
size_t GetUtf8Length(const char *str) size_t GetUtf8Length(const char *str)
{ {
static unsigned char utf8_look_for_table[] = static unsigned char utf8_look_for_table[] =
@ -455,6 +459,7 @@ namespace a8
len++, ptr+=UTFLEN((unsigned char)*ptr)) ; len++, ptr+=UTFLEN((unsigned char)*ptr)) ;
return len; return len;
} }
#pragma GCC diagnostic pop
std::string CopyString(const std::string& str) std::string CopyString(const std::string& str)
{ {

View File

@ -22,10 +22,10 @@ namespace a8
struct SendQueueNode struct SendQueueNode
{ {
char* buff = nullptr; char* buff;
unsigned int bufflen = 0; unsigned int bufflen;
unsigned int sent_bytes = 0; unsigned int sent_bytes;
SendQueueNode* next = nullptr; SendQueueNode* next;
}; };
typedef std::function<void(const a8::Args&)> CommonCbProc; typedef std::function<void(const a8::Args&)> CommonCbProc;