Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Compiler Warnings + Minor Corrections + OpenDIS7 build target #31

Merged
merged 8 commits into from
Oct 10, 2019
13 changes: 13 additions & 0 deletions premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ project "OpenDIS"
"src/utils/*.cpp"
}

project "OpenDIS7"
language "C++"
kind "SharedLib"
includedirs {
"src"
}
files {
"src/dis7/*.h",
"src/dis7/*.cpp",
"src/utils/*.h",
"src/utils/*.cpp"
}

project "ExampleSender"
language "C++"
kind "ConsoleApp"
Expand Down
2 changes: 1 addition & 1 deletion src/dis6/AcousticEmitterSystemData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ int AcousticEmitterSystemData::getMarshalledSize() const
marshalSize = marshalSize + _acousticEmitterSystem.getMarshalledSize(); // _acousticEmitterSystem
marshalSize = marshalSize + _emitterLocation.getMarshalledSize(); // _emitterLocation

for(int idx=0; idx < _beamRecords.size(); idx++)
for(unsigned long long idx=0; idx < _beamRecords.size(); idx++)
{
AcousticBeamData listElement = _beamRecords[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
4 changes: 2 additions & 2 deletions src/dis6/ActionRequestPdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ int ActionRequestPdu::getMarshalledSize() const
marshalSize = marshalSize + 4; // _numberOfFixedDatumRecords
marshalSize = marshalSize + 4; // _numberOfVariableDatumRecords

for(int idx=0; idx < _fixedDatums.size(); idx++)
for(unsigned long long idx=0; idx < _fixedDatums.size(); idx++)
{
FixedDatum listElement = _fixedDatums[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
}


for(int idx=0; idx < _variableDatums.size(); idx++)
for(unsigned long long idx=0; idx < _variableDatums.size(); idx++)
{
VariableDatum listElement = _variableDatums[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
4 changes: 2 additions & 2 deletions src/dis6/ActionRequestReliablePdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,14 @@ int ActionRequestReliablePdu::getMarshalledSize() const
marshalSize = marshalSize + 4; // _numberOfFixedDatumRecords
marshalSize = marshalSize + 4; // _numberOfVariableDatumRecords

for(int idx=0; idx < _fixedDatumRecords.size(); idx++)
for(unsigned long long idx=0; idx < _fixedDatumRecords.size(); idx++)
{
FixedDatum listElement = _fixedDatumRecords[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
}


for(int idx=0; idx < _variableDatumRecords.size(); idx++)
for(unsigned long long idx=0; idx < _variableDatumRecords.size(); idx++)
{
VariableDatum listElement = _variableDatumRecords[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
4 changes: 2 additions & 2 deletions src/dis6/ActionResponsePdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ int ActionResponsePdu::getMarshalledSize() const
marshalSize = marshalSize + 4; // _numberOfFixedDatumRecords
marshalSize = marshalSize + 4; // _numberOfVariableDatumRecords

for(int idx=0; idx < _fixedDatums.size(); idx++)
for(unsigned long long idx=0; idx < _fixedDatums.size(); idx++)
{
FixedDatum listElement = _fixedDatums[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
}


for(int idx=0; idx < _variableDatums.size(); idx++)
for(unsigned long long idx=0; idx < _variableDatums.size(); idx++)
{
VariableDatum listElement = _variableDatums[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
4 changes: 2 additions & 2 deletions src/dis6/ActionResponseReliablePdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ int ActionResponseReliablePdu::getMarshalledSize() const
marshalSize = marshalSize + 4; // _numberOfFixedDatumRecords
marshalSize = marshalSize + 4; // _numberOfVariableDatumRecords

for(int idx=0; idx < _fixedDatumRecords.size(); idx++)
for(unsigned long long idx=0; idx < _fixedDatumRecords.size(); idx++)
{
FixedDatum listElement = _fixedDatumRecords[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
}


for(int idx=0; idx < _variableDatumRecords.size(); idx++)
for(unsigned long long idx=0; idx < _variableDatumRecords.size(); idx++)
{
VariableDatum listElement = _variableDatumRecords[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
2 changes: 1 addition & 1 deletion src/dis6/AggregateMarking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ bool AggregateMarking::operator ==(const AggregateMarking& rhs) const

if( ! (_characterSet == rhs._characterSet) ) ivarsEqual = false;

for(char idx = 0; idx < 31; idx++)
for(unsigned char idx = 0; idx < 31; idx++)
{
if(!(_characters[idx] == rhs._characters[idx]) ) ivarsEqual = false;
}
Expand Down
10 changes: 5 additions & 5 deletions src/dis6/AggregateStatePdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,37 +467,37 @@ int AggregateStatePdu::getMarshalledSize() const
marshalSize = marshalSize + 2; // _numberOfSilentAggregateTypes
marshalSize = marshalSize + 2; // _numberOfSilentEntityTypes

for(int idx=0; idx < _aggregateIDList.size(); idx++)
for(unsigned long long idx=0; idx < _aggregateIDList.size(); idx++)
{
AggregateID listElement = _aggregateIDList[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
}


for(int idx=0; idx < _entityIDList.size(); idx++)
for(unsigned long long idx=0; idx < _entityIDList.size(); idx++)
{
EntityID listElement = _entityIDList[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
}

marshalSize = marshalSize + 1; // _pad2

for(int idx=0; idx < _silentAggregateSystemList.size(); idx++)
for(unsigned long long idx=0; idx < _silentAggregateSystemList.size(); idx++)
{
EntityType listElement = _silentAggregateSystemList[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
}


for(int idx=0; idx < _silentEntitySystemList.size(); idx++)
for(unsigned long long idx=0; idx < _silentEntitySystemList.size(); idx++)
{
EntityType listElement = _silentEntitySystemList[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
}

marshalSize = marshalSize + 4; // _numberOfVariableDatumRecords

for(int idx=0; idx < _variableDatumList.size(); idx++)
for(unsigned long long idx=0; idx < _variableDatumList.size(); idx++)
{
VariableDatum listElement = _variableDatumList[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
2 changes: 1 addition & 1 deletion src/dis6/ArealObjectStatePdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ int ArealObjectStatePdu::getMarshalledSize() const
marshalSize = marshalSize + _requesterID.getMarshalledSize(); // _requesterID
marshalSize = marshalSize + _receivingID.getMarshalledSize(); // _receivingID

for(int idx=0; idx < _objectLocation.size(); idx++)
for(unsigned long long idx=0; idx < _objectLocation.size(); idx++)
{
Vector3Double listElement = _objectLocation[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
4 changes: 2 additions & 2 deletions src/dis6/CommentPdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ int CommentPdu::getMarshalledSize() const
marshalSize = marshalSize + 4; // _numberOfFixedDatumRecords
marshalSize = marshalSize + 4; // _numberOfVariableDatumRecords

for(int idx=0; idx < _fixedDatums.size(); idx++)
for(unsigned long long idx=0; idx < _fixedDatums.size(); idx++)
{
FixedDatum listElement = _fixedDatums[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
}


for(int idx=0; idx < _variableDatums.size(); idx++)
for(unsigned long long idx=0; idx < _variableDatums.size(); idx++)
{
VariableDatum listElement = _variableDatums[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
4 changes: 2 additions & 2 deletions src/dis6/CommentReliablePdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ int CommentReliablePdu::getMarshalledSize() const
marshalSize = marshalSize + 4; // _numberOfFixedDatumRecords
marshalSize = marshalSize + 4; // _numberOfVariableDatumRecords

for(int idx=0; idx < _fixedDatumRecords.size(); idx++)
for(unsigned long long idx=0; idx < _fixedDatumRecords.size(); idx++)
{
FixedDatum listElement = _fixedDatumRecords[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
}


for(int idx=0; idx < _variableDatumRecords.size(); idx++)
for(unsigned long long idx=0; idx < _variableDatumRecords.size(); idx++)
{
VariableDatum listElement = _variableDatumRecords[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
4 changes: 2 additions & 2 deletions src/dis6/DataPdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ int DataPdu::getMarshalledSize() const
marshalSize = marshalSize + 4; // _numberOfFixedDatumRecords
marshalSize = marshalSize + 4; // _numberOfVariableDatumRecords

for(int idx=0; idx < _fixedDatums.size(); idx++)
for(unsigned long long idx=0; idx < _fixedDatums.size(); idx++)
{
FixedDatum listElement = _fixedDatums[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
}


for(int idx=0; idx < _variableDatums.size(); idx++)
for(unsigned long long idx=0; idx < _variableDatums.size(); idx++)
{
VariableDatum listElement = _variableDatums[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
4 changes: 2 additions & 2 deletions src/dis6/DataQueryPdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ int DataQueryPdu::getMarshalledSize() const
marshalSize = marshalSize + 4; // _numberOfFixedDatumRecords
marshalSize = marshalSize + 4; // _numberOfVariableDatumRecords

for(int idx=0; idx < _fixedDatums.size(); idx++)
for(unsigned long long idx=0; idx < _fixedDatums.size(); idx++)
{
FixedDatum listElement = _fixedDatums[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
}


for(int idx=0; idx < _variableDatums.size(); idx++)
for(unsigned long long idx=0; idx < _variableDatums.size(); idx++)
{
VariableDatum listElement = _variableDatums[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
4 changes: 2 additions & 2 deletions src/dis6/DataQueryReliablePdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,14 @@ int DataQueryReliablePdu::getMarshalledSize() const
marshalSize = marshalSize + 4; // _numberOfFixedDatumRecords
marshalSize = marshalSize + 4; // _numberOfVariableDatumRecords

for(int idx=0; idx < _fixedDatumRecords.size(); idx++)
for(unsigned long long idx=0; idx < _fixedDatumRecords.size(); idx++)
{
FixedDatum listElement = _fixedDatumRecords[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
}


for(int idx=0; idx < _variableDatumRecords.size(); idx++)
for(unsigned long long idx=0; idx < _variableDatumRecords.size(); idx++)
{
VariableDatum listElement = _variableDatumRecords[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
4 changes: 2 additions & 2 deletions src/dis6/DataReliablePdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,14 @@ int DataReliablePdu::getMarshalledSize() const
marshalSize = marshalSize + 4; // _numberOfFixedDatumRecords
marshalSize = marshalSize + 4; // _numberOfVariableDatumRecords

for(int idx=0; idx < _fixedDatumRecords.size(); idx++)
for(unsigned long long idx=0; idx < _fixedDatumRecords.size(); idx++)
{
FixedDatum listElement = _fixedDatumRecords[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
}


for(int idx=0; idx < _variableDatumRecords.size(); idx++)
for(unsigned long long idx=0; idx < _variableDatumRecords.size(); idx++)
{
VariableDatum listElement = _variableDatumRecords[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
2 changes: 1 addition & 1 deletion src/dis6/DeadReckoningParameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ bool DeadReckoningParameter::operator ==(const DeadReckoningParameter& rhs) cons

if( ! (_deadReckoningAlgorithm == rhs._deadReckoningAlgorithm) ) ivarsEqual = false;

for(char idx = 0; idx < 15; idx++)
for(unsigned char idx = 0; idx < 15; idx++)
{
if(!(_otherParameters[idx] == rhs._otherParameters[idx]) ) ivarsEqual = false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/dis6/DetonationPdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ int DetonationPdu::getMarshalledSize() const
marshalSize = marshalSize + 1; // _numberOfArticulationParameters
marshalSize = marshalSize + 2; // _pad

for(int idx=0; idx < _articulationParameters.size(); idx++)
for(unsigned long long idx=0; idx < _articulationParameters.size(); idx++)
{
ArticulationParameter listElement = _articulationParameters[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
2 changes: 1 addition & 1 deletion src/dis6/EightByteChunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ bool EightByteChunk::operator ==(const EightByteChunk& rhs) const
bool ivarsEqual = true;


for(char idx = 0; idx < 8; idx++)
for(unsigned char idx = 0; idx < 8; idx++)
{
if(!(_otherParameters[idx] == rhs._otherParameters[idx]) ) ivarsEqual = false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/dis6/ElectronicEmissionBeamData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ int ElectronicEmissionBeamData::getMarshalledSize() const
marshalSize = marshalSize + 1; // _pad4
marshalSize = marshalSize + 4; // _jammingModeSequence

for(int idx=0; idx < _trackJamTargets.size(); idx++)
for(unsigned long long idx=0; idx < _trackJamTargets.size(); idx++)
{
TrackJamTarget listElement = _trackJamTargets[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
2 changes: 1 addition & 1 deletion src/dis6/ElectronicEmissionSystemData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ int ElectronicEmissionSystemData::getMarshalledSize() const
marshalSize = marshalSize + _emitterSystem.getMarshalledSize(); // _emitterSystem
marshalSize = marshalSize + _location.getMarshalledSize(); // _location

for(int idx=0; idx < _beamDataRecords.size(); idx++)
for(unsigned long long idx=0; idx < _beamDataRecords.size(); idx++)
{
ElectronicEmissionBeamData listElement = _beamDataRecords[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
2 changes: 1 addition & 1 deletion src/dis6/ElectronicEmissionsPdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ int ElectronicEmissionsPdu::getMarshalledSize() const
marshalSize = marshalSize + 1; // _numberOfSystems
marshalSize = marshalSize + 2; // _paddingForEmissionsPdu

for(int idx=0; idx < _systems.size(); idx++)
for(unsigned long long idx=0; idx < _systems.size(); idx++)
{
ElectronicEmissionSystemData listElement = _systems[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
4 changes: 2 additions & 2 deletions src/dis6/EntityStatePdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void EntityStatePdu::unmarshal(DataStream& dataStream)
dataStream >> _capabilities;

_articulationParameters.clear();
for(size_t idx = 0; idx < _numberOfArticulationParameters; idx++)
for(char idx = 0; idx < _numberOfArticulationParameters; idx++)
{
ArticulationParameter x;
x.unmarshal(dataStream);
Expand Down Expand Up @@ -290,7 +290,7 @@ int EntityStatePdu::getMarshalledSize() const
marshalSize = marshalSize + _marking.getMarshalledSize(); // _marking
marshalSize = marshalSize + 4; // _capabilities

for(int idx=0; idx < _articulationParameters.size(); idx++)
for(unsigned long long idx=0; idx < _articulationParameters.size(); idx++)
{
ArticulationParameter listElement = _articulationParameters[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
2 changes: 1 addition & 1 deletion src/dis6/EntityStateUpdatePdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ int EntityStateUpdatePdu::getMarshalledSize() const
marshalSize = marshalSize + _entityOrientation.getMarshalledSize(); // _entityOrientation
marshalSize = marshalSize + 4; // _entityAppearance

for(int idx=0; idx < _articulationParameters.size(); idx++)
for(unsigned long long idx=0; idx < _articulationParameters.size(); idx++)
{
ArticulationParameter listElement = _articulationParameters[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
2 changes: 1 addition & 1 deletion src/dis6/EnvironmentalProcessPdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ int EnvironmentalProcessPdu::getMarshalledSize() const
marshalSize = marshalSize + 1; // _numberOfEnvironmentRecords
marshalSize = marshalSize + 2; // _sequenceNumber

for(int idx=0; idx < _environmentRecords.size(); idx++)
for(unsigned long long idx=0; idx < _environmentRecords.size(); idx++)
{
Environment listElement = _environmentRecords[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
4 changes: 2 additions & 2 deletions src/dis6/EventReportPdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ int EventReportPdu::getMarshalledSize() const
marshalSize = marshalSize + 4; // _numberOfFixedDatumRecords
marshalSize = marshalSize + 4; // _numberOfVariableDatumRecords

for(int idx=0; idx < _fixedDatums.size(); idx++)
for(unsigned long long idx=0; idx < _fixedDatums.size(); idx++)
{
FixedDatum listElement = _fixedDatums[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
}


for(int idx=0; idx < _variableDatums.size(); idx++)
for(unsigned long long idx=0; idx < _variableDatums.size(); idx++)
{
VariableDatum listElement = _variableDatums[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
4 changes: 2 additions & 2 deletions src/dis6/EventReportReliablePdu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ int EventReportReliablePdu::getMarshalledSize() const
marshalSize = marshalSize + 4; // _numberOfFixedDatumRecords
marshalSize = marshalSize + 4; // _numberOfVariableDatumRecords

for(int idx=0; idx < _fixedDatumRecords.size(); idx++)
for(unsigned long long idx=0; idx < _fixedDatumRecords.size(); idx++)
{
FixedDatum listElement = _fixedDatumRecords[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
}


for(int idx=0; idx < _variableDatumRecords.size(); idx++)
for(unsigned long long idx=0; idx < _variableDatumRecords.size(); idx++)
{
VariableDatum listElement = _variableDatumRecords[idx];
marshalSize = marshalSize + listElement.getMarshalledSize();
Expand Down
Loading