Skip to content

Commit

Permalink
Removing null checks before delete (addresses issue 169)
Browse files Browse the repository at this point in the history
Removing identifiers that step into reserved territory (addresses issue 168)
  • Loading branch information
miatauro-NASA committed Mar 27, 2015
1 parent 2a93447 commit 63e2c96
Show file tree
Hide file tree
Showing 140 changed files with 313 additions and 317 deletions.
3 changes: 1 addition & 2 deletions src/PLASMA/ANML/ModuleAnml.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ namespace EUROPA {
void ModuleAnml::uninitialize(EngineId engine)
{
LanguageInterpreter *old = engine->removeLanguageInterpreter("anml");
if (old)
delete old;
delete old;
}
}
6 changes: 3 additions & 3 deletions src/PLASMA/ANML/ModuleAnml.hh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef _H_ModuleAnml
#define _H_ModuleAnml
#ifndef H_ModuleAnml
#define H_ModuleAnml

#include "Module.hh"

Expand Down Expand Up @@ -29,4 +29,4 @@ namespace EUROPA {
}


#endif /* #ifndef _H_ModuleAnml */
#endif /* #ifndef H_ModuleAnml */
6 changes: 3 additions & 3 deletions src/PLASMA/ANML/component/AnmlTestEngine.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_ANML_TEST_ENGINE_
#define _H_ANML_TEST_ENGINE_
#ifndef H_ANML_TEST_ENGINE_
#define H_ANML_TEST_ENGINE_

#include "NddlTestEngine.hh"

Expand All @@ -13,4 +13,4 @@ class AnmlTestEngine : public NddlTestEngine
virtual void createModules();
};

#endif // _H_ANML_TEST_ENGINE_
#endif // H_ANML_TEST_ENGINE_
6 changes: 3 additions & 3 deletions src/PLASMA/ConstraintEngine/ConstraintEngineDefs.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_ConstraintEngineDefs
#define _H_ConstraintEngineDefs
#ifndef H_ConstraintEngineDefs
#define H_ConstraintEngineDefs

/**
* Just provide forward declarations of classes and certain global declarations related to error handling.
Expand Down Expand Up @@ -72,4 +72,4 @@ DECLARE_GLOBAL_CONST(std::string, g_noVarName);

} /* namespace EUROPA */

#endif /* #ifndef _H_ConstraintEngineDefs */
#endif /* #ifndef H_ConstraintEngineDefs */
6 changes: 3 additions & 3 deletions src/PLASMA/ConstraintEngine/ModuleConstraintEngine.hh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef _H_ModuleConstraintEngine
#define _H_ModuleConstraintEngine
#ifndef H_ModuleConstraintEngine
#define H_ModuleConstraintEngine

#include "Module.hh"

Expand Down Expand Up @@ -51,4 +51,4 @@ namespace EUROPA {
}


#endif /* #ifndef _H_ModuleConstraintEngine */
#endif /* #ifndef H_ModuleConstraintEngine */
6 changes: 3 additions & 3 deletions src/PLASMA/ConstraintEngine/base/CESchema.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_CESchema
#define _H_CESchema
#ifndef H_CESchema
#define H_CESchema

#include "ConstraintEngineDefs.hh"
#include "Engine.hh"
Expand Down Expand Up @@ -56,4 +56,4 @@ class CESchema : public EngineComponent

} // namespace EUROPA

#endif // _H_CESchema
#endif // H_CESchema
4 changes: 2 additions & 2 deletions src/PLASMA/ConstraintEngine/base/ConstrainedVariable.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_ConstrainedVariable
#define _H_ConstrainedVariable
#ifndef H_ConstrainedVariable
#define H_ConstrainedVariable

/**
* @file ConstrainedVariable.hh
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/ConstraintEngine/base/Constraint.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_Constraint
#define _H_Constraint
#ifndef H_Constraint
#define H_Constraint

/**
* @file Constraint.hh
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/ConstraintEngine/base/ConstraintEngine.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_ConstraintEngine
#define _H_ConstraintEngine
#ifndef H_ConstraintEngine
#define H_ConstraintEngine

/**
* @file ConstraintEngine.hh
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/ConstraintEngine/base/ConstraintEngineListener.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_ConstraintEngineListener
#define _H_ConstraintEngineListener
#ifndef H_ConstraintEngineListener
#define H_ConstraintEngineListener

#include "ConstraintEngineDefs.hh"
#include "DomainListener.hh"
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/ConstraintEngine/base/ConstraintType.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_ConstraintType
#define _H_ConstraintType
#ifndef H_ConstraintType
#define H_ConstraintType

#include "ConstraintEngineDefs.hh"
#include "Constraint.hh"
Expand Down
6 changes: 3 additions & 3 deletions src/PLASMA/ConstraintEngine/base/ConstraintTypeChecking.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _CONSTRAINTTYPECHECKING_H_
#define _CONSTRAINTTYPECHECKING_H_
#ifndef CONSTRAINTTYPECHECKING_H_
#define CONSTRAINTTYPECHECKING_H_

#include "ConstraintType.hh"
#include "DataType.hh"
Expand Down Expand Up @@ -501,4 +501,4 @@ class DataTypeCheck : public DataTypeCheckBase<TypeCheck> {
};
}

#endif /* _CONSTRAINTTYPECHECKING_H_ */
#endif /* CONSTRAINTTYPECHECKING_H_ */
4 changes: 2 additions & 2 deletions src/PLASMA/ConstraintEngine/base/Domain.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_Domain
#define _H_Domain
#ifndef H_Domain
#define H_Domain

/**
* @file Domain.hh
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/ConstraintEngine/base/DomainListener.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_DomainListener
#define _H_DomainListener
#ifndef H_DomainListener
#define H_DomainListener

/**
* @file DomainListener.hh
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/ConstraintEngine/base/PSConstraintEngine.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_PSConstraintEngine
#define _H_PSConstraintEngine
#ifndef H_PSConstraintEngine
#define H_PSConstraintEngine

#include "Engine.hh"
#include "PSEntity.hh"
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/ConstraintEngine/base/PSVarValue.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_PSVarValue
#define _H_PSVarValue
#ifndef H_PSVarValue
#define H_PSVarValue

#include "PSConstraintEngine.hh"
#include "LabelStr.hh"
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/ConstraintEngine/base/Propagator.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_Propagator
#define _H_Propagator
#ifndef H_Propagator
#define H_Propagator

/**
* @file Propagator.hh
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/ConstraintEngine/base/VariableChangeListener.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_VariableChangeListener
#define _H_VariableChangeListener
#ifndef H_VariableChangeListener
#define H_VariableChangeListener

/**
* @file VariableChangeListener.hh
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/ConstraintEngine/component/Constraints.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_Constraints
#define _H_Constraints
#ifndef H_Constraints
#define H_Constraints

#include "ConstraintEngineDefs.hh"
#include "Constraint.hh"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_EquivalenceClassCollection
#define _H_EquivalenceClassCollection
#ifndef H_EquivalenceClassCollection
#define H_EquivalenceClassCollection

/**
* @file EquivalenceClassCollection.hh
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/ConstraintEngine/component/Variable.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_AbstractVar
#define _H_AbstractVar
#ifndef H_AbstractVar
#define H_AbstractVar

#include "Domain.hh"
#include "ConstrainedVariable.hh"
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/ConstraintEngine/test/ConstraintTesting.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_CONSTRAINT_TESTING
#define _H_CONSTRAINT_TESTING
#ifndef H_CONSTRAINT_TESTING
#define H_CONSTRAINT_TESTING

/**
* @file ConstraintTesting.hh
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/ConstraintEngine/test/domain-tests.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_DomainTests
#define _H_DomainTests
#ifndef H_DomainTests
#define H_DomainTests

class DomainTests {
public:
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/ConstraintEngine/test/module-tests.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_ModuleTests
#define _H_ModuleTests
#ifndef H_ModuleTests
#define H_ModuleTests

#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
Expand Down
6 changes: 3 additions & 3 deletions src/PLASMA/NDDL/ModuleNddl.hh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef _H_ModuleNddl
#define _H_ModuleNddl
#ifndef H_ModuleNddl
#define H_ModuleNddl

#include "Module.hh"

Expand Down Expand Up @@ -29,4 +29,4 @@ namespace EUROPA {
}


#endif /* #ifndef _H_ModuleNddl */
#endif /* #ifndef H_ModuleNddl */
6 changes: 3 additions & 3 deletions src/PLASMA/NDDL/component/Interpreter.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_Interpreter
#define _H_Interpreter
#ifndef H_Interpreter
#define H_Interpreter

#include <vector>

Expand Down Expand Up @@ -711,4 +711,4 @@ void getVariableReferences(const Expr* expr, EvalContext& ctx, std::vector<Const

}

#endif // _H_Interpreter
#endif // H_Interpreter
6 changes: 3 additions & 3 deletions src/PLASMA/NDDL/component/NddlTestEngine.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_NDDL_TEST_ENGINE_
#define _H_NDDL_TEST_ENGINE_
#ifndef H_NDDL_TEST_ENGINE_
#define H_NDDL_TEST_ENGINE_

#include "Engine.hh"

Expand All @@ -16,4 +16,4 @@ class NddlTestEngine : public EUROPA::EngineBase {
virtual void createModules();
};

#endif // _H_NDDL_TEST_ENGINE_
#endif // H_NDDL_TEST_ENGINE_
6 changes: 3 additions & 3 deletions src/PLASMA/PlanDatabase/ModulePlanDatabase.hh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef _H_ModulePlanDatabase
#define _H_ModulePlanDatabase
#ifndef H_ModulePlanDatabase
#define H_ModulePlanDatabase

#include "Module.hh"

Expand Down Expand Up @@ -29,4 +29,4 @@ namespace EUROPA {
}


#endif /* #ifndef _H_ModulePlanDatabase */
#endif /* #ifndef H_ModulePlanDatabase */
4 changes: 2 additions & 2 deletions src/PLASMA/PlanDatabase/PlanDatabaseDefs.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_PlanDatabaseDefs
#define _H_PlanDatabaseDefs
#ifndef H_PlanDatabaseDefs
#define H_PlanDatabaseDefs

#include "ConstraintEngineDefs.hh"
#include "Entity.hh"
Expand Down
6 changes: 3 additions & 3 deletions src/PLASMA/PlanDatabase/PlanDatabaseVarDefs.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _PLANDATABASEVARDEFS_H_
#define _PLANDATABASEVARDEFS_H_
#ifndef PLANDATABASEVARDEFS_H_
#define PLANDATABASEVARDEFS_H_

#include "Id.hh"
#include "Variable.hh"
Expand All @@ -18,4 +18,4 @@ namespace EUROPA {

}

#endif /* _PLANDATABASEVARDEFS_H_ */
#endif /* PLANDATABASEVARDEFS_H_ */
4 changes: 2 additions & 2 deletions src/PLASMA/PlanDatabase/base/CommonAncestorConstraint.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_CommonAncestorConstraint
#define _H_CommonAncestorConstraint
#ifndef H_CommonAncestorConstraint
#define H_CommonAncestorConstraint

/**
* @file CommonAncestor.hh
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/PlanDatabase/base/DbClient.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_DbClient
#define _H_DbClient
#ifndef H_DbClient
#define H_DbClient

#include "PlanDatabaseDefs.hh"
#include "PSPlanDatabase.hh"
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/PlanDatabase/base/DbClientListener.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_DbClientListener
#define _H_DbClientListener
#ifndef H_DbClientListener
#define H_DbClientListener

#include "PlanDatabaseDefs.hh"
#include "DbClient.hh"
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/PlanDatabase/base/DefaultTemporalAdvisor.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_DefaultTemporalAdvisor
#define _H_DefaultTemporalAdvisor
#ifndef H_DefaultTemporalAdvisor
#define H_DefaultTemporalAdvisor

#include "PlanDatabaseDefs.hh"
#include "TemporalAdvisor.hh"
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/PlanDatabase/base/HasAncestorConstraint.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_HasAncestorConstraint
#define _H_HasAncestorConstraint
#ifndef H_HasAncestorConstraint
#define H_HasAncestorConstraint

#include "PlanDatabaseDefs.hh"
#include "Constraint.hh"
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/PlanDatabase/base/MergeMemento.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_MergeMemento
#define _H_MergeMemento
#ifndef H_MergeMemento
#define H_MergeMemento

#include "ConstraintEngineDefs.hh"
#include "PlanDatabaseDefs.hh"
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/PlanDatabase/base/Object.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_Object
#define _H_Object
#ifndef H_Object
#define H_Object

/**
* @file Object.hh
Expand Down
4 changes: 2 additions & 2 deletions src/PLASMA/PlanDatabase/base/ObjectTokenRelation.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_ObjectTokenRelation
#define _H_ObjectTokenRelation
#ifndef H_ObjectTokenRelation
#define H_ObjectTokenRelation

#include "PlanDatabaseDefs.hh"
#include "DomainListener.hh"
Expand Down
6 changes: 3 additions & 3 deletions src/PLASMA/PlanDatabase/base/PDBInterpreter.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_PDBInterpreter
#define _H_PDBInterpreter
#ifndef H_PDBInterpreter
#define H_PDBInterpreter

#include "ConstraintEngineDefs.hh"
#include "PlanDatabaseDefs.hh"
Expand Down Expand Up @@ -93,4 +93,4 @@ class EvalContext {

}

#endif // _H_PDBInterpreter
#endif // H_PDBInterpreter
4 changes: 2 additions & 2 deletions src/PLASMA/PlanDatabase/base/PSPlanDatabase.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _H_PSPlanDatabase
#define _H_PSPlanDatabase
#ifndef H_PSPlanDatabase
#define H_PSPlanDatabase

#include "PSConstraintEngine.hh"
#include "ConstraintEngineDefs.hh"
Expand Down
Loading

1 comment on commit 63e2c96

@elfring
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would have been cleaner to separate the software updates for the affected issues, wouldn't it?

Please sign in to comment.