pip_cmg less code

This commit is contained in:
2023-09-05 19:42:45 +03:00
parent 3afa0ce0ab
commit aa69815a31

View File

@@ -315,7 +315,7 @@ bool writeClassStreamMembersOut(PIIOTextStream & ts, const PICodeParser::Entity
if (parser.isEnum(m.type)) ts << "(int)";
ts << "v." << m.name << ";\n";
} else {
ts << "\tcs << cs.chunk(" << cnt << ", ";
ts << "\tcs.add(" << cnt << ", ";
if (parser.isEnum(m.type)) ts << "(int)";
ts << "v." << m.name << ");\n";
}
@@ -440,8 +440,8 @@ bool makeClassStream(PIIOTextStream & ts, const PICodeParser::Entity * e) {
ts << "BINARY_STREAM_READ (" << e->name << ") {\n";
if (!simple) {
// ts << "\tif (s.size_s() < 4) return s;\n";
ts << "\tPIByteArray csba; s >> csba;\n";
ts << "\tPIChunkStream cs(csba);\n";
ts << "\tPIChunkStream cs;\n";
ts << "\tcs.extract(s);\n";
ts << "\twhile (!cs.atEnd()) {\n";
ts << "\t\tswitch (cs.read()) {\n";
}