Skip to content

Commit

Permalink
Fix bug that was unintentionally outputting structure decode function…
Browse files Browse the repository at this point in the history
… prototypes twice.
  • Loading branch information
billvaglienti committed Jun 3, 2016
1 parent 145056d commit 8821256
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion protocolparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <iostream>

// The version of the protocol generator is set here
const QString ProtocolParser::genVersion = "1.4.5.a";
const QString ProtocolParser::genVersion = "1.4.5.b";

// A static list of parsed structures
QList<ProtocolStructureModule*> ProtocolParser::structures;
Expand Down
12 changes: 6 additions & 6 deletions protocolstructuremodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,13 @@ void ProtocolStructureModule::parse(const QDomElement& e)
header.makeLineSeparator();

// The encoded size of this structure as a macro that others can access
header.write("#define getMinLengthOf" + typeName + "() (" + encodedLength.minEncodedLength + ")\n");
if((encode != false) || (decode != false))
{
header.write("#define getMinLengthOf" + typeName + "() (" + encodedLength.minEncodedLength + ")\n");

// White space is good
header.makeLineSeparator();
// White space is good
header.makeLineSeparator();
}

// Write to disk
header.flush();
Expand Down Expand Up @@ -273,9 +276,6 @@ void ProtocolStructureModule::createTopLevelStructureFunctions(void)
header.makeLineSeparator();
source.makeLineSeparator();

header.write(getPrototypeDecodeString(isBigEndian, false));
header.makeLineSeparator();

}// ProtocolStructureModule::createTopLevelStructureFunctions


Expand Down

0 comments on commit 8821256

Please sign in to comment.