mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-05-18 23:29:12 +00:00
perf[protocol]: 使用模板生成协议
This commit is contained in:
@@ -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))) {
|
||||
|
||||
@@ -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))) {
|
||||
|
||||
Reference in New Issue
Block a user