perf[protocol]: 使用模板生成协议

This commit is contained in:
jaysunxiao committed 2022-05-16 21:24:43 +08:00
1 parent 07ff2dc004
commit 5c379dd21c
2 files changed
+2 -2

No files matched your search

@@ -75,7 +75,7 @@ namespace serialization_test {
void complexObjectTest() {
// 读取二进制文件
ifstream file("../resources/ComplexObject.bytes", ios::out | ios::binary);
ifstream file("../../resources/ComplexObject.bytes", ios::out | ios::binary);
unsigned char carray[10000];
int length = 0;
while (file.read((char *) &carray[length], sizeof(unsigned char))) {
+1 -1
View File
@@ -20,7 +20,7 @@ namespace speed_test {
void parseObject() {
// 读取二进制文件
ifstream file("../resources/ComplexObject.bytes", ios::out | ios::binary);
ifstream file("../../resources/ComplexObject.bytes", ios::out | ios::binary);
unsigned char carray[10000];
int length = 0;
while (file.read((char *) &carray[length], sizeof(unsigned char))) {