Commit 1121acb4 authored by snuverink_j's avatar snuverink_j
Browse files

various cosmetic improvements

parent b258bf6a
......@@ -152,7 +152,7 @@ template<class C>
template<class C>
void updateGhostParticles(
IpplParticleBase< ParticleSpatialLayout<T,Dim,Mesh,C > > &PData,
ParticleSpatialLayout<T, Dim, Mesh, C > &PLayout
ParticleSpatialLayout<T, Dim, Mesh, C > &/*PLayout*/
)
{
......
......@@ -708,7 +708,7 @@ IpplParticleBase<PLayout>::ghostGetMessage(Message& msg, int node) {
template<class PLayout>
size_t
IpplParticleBase<PLayout>::ghostGetSingleMessage(Message& msg, int node) {
IpplParticleBase<PLayout>::ghostGetSingleMessage(Message& msg, int /*node*/) {
// make sure we've been initialized
PAssert(Layout != 0);
......
......@@ -260,7 +260,7 @@ public:
// the precomputed mesh information
template <unsigned Dim, class M, class C, class IntOp, class CacheData>
void
scatter(Field<T,Dim,M,C>& f, const IntOp& intop,
scatter(Field<T,Dim,M,C>& f, const IntOp& /*intop*/,
const ParticleAttrib<CacheData>& cache) const {
......@@ -289,7 +289,7 @@ public:
void
gather(const Field<T,Dim,M,C>& f,
const ParticleAttrib< Vektor<PT,Dim> >& pp,
const IntOp& intop) {
const IntOp& /*intop*/) {
// make sure field is uncompressed
......@@ -319,7 +319,7 @@ public:
void
gather(const Field<T,Dim,M,C>& f,
const ParticleAttrib< Vektor<PT,Dim> >& pp,
const IntOp& intop,
const IntOp& /*intop*/,
ParticleAttrib<CacheData>& cache) {
......@@ -348,7 +348,7 @@ public:
// the precomputed mesh information
template <unsigned Dim, class M, class C, class IntOp, class CacheData>
void
gather(const Field<T,Dim,M,C>& f, const IntOp& intop,
gather(const Field<T,Dim,M,C>& f, const IntOp& /*intop*/,
const ParticleAttrib<CacheData>& cache) {
......
......@@ -560,7 +560,7 @@ void ParticleAttrib<T>::sort(SortList_t &slist)
template <class FT, unsigned Dim, class M, class C, class PT, class IntOp>
void
scatter(Field<FT,Dim,M,C>& f, const ParticleAttrib< Vektor<PT,Dim> >& pp,
const IntOp& intop, FT val) {
const IntOp& /*intop*/, FT val) {
// make sure field is uncompressed and guard cells are zeroed
f.Uncompress();
......@@ -585,7 +585,7 @@ template <class FT, unsigned Dim, class M, class C, class PT,
class IntOp, class CacheData>
void
scatter(Field<FT,Dim,M,C>& f, const ParticleAttrib< Vektor<PT,Dim> >& pp,
const IntOp& intop, ParticleAttrib<CacheData>& cache, FT val) {
const IntOp& /*intop*/, ParticleAttrib<CacheData>& cache, FT val) {
// make sure field is uncompressed and guard cells are zeroed
f.Uncompress();
......@@ -610,7 +610,7 @@ scatter(Field<FT,Dim,M,C>& f, const ParticleAttrib< Vektor<PT,Dim> >& pp,
template <class FT, unsigned Dim, class M, class C,
class IntOp, class CacheData>
void
scatter(Field<FT,Dim,M,C>& f, const IntOp& intop,
scatter(Field<FT,Dim,M,C>& f, const IntOp& /*intop*/,
const ParticleAttrib<CacheData>& cache, FT val) {
// make sure field is uncompressed and guard cells are zeroed
......
......@@ -39,10 +39,8 @@ using namespace std;
// debugging macros
#ifdef IPPL_PRINTDEBUG
#define DCDBG(x) x
#define CDCDBG(x) x
#else
#define DCDBG(x)
#define CDCDBG(x)
#endif
......
......@@ -25,7 +25,6 @@
#include <map>
class Attribute;
class AttributeBase;
class Statement;
......
......@@ -64,12 +64,12 @@ void Directory::erase(const std::string &name) {
Object *Directory::find(const std::string &name) const {
ObjectDir::const_iterator index = dir.find(name);
ObjectDir::const_iterator it = dir.find(name);
if(index == dir.end()) {
return 0;
if(it == dir.end()) {
return NULL;
} else {
return &*index->second;
return &*it->second;
}
}
......
......@@ -154,6 +154,7 @@ OpalDataImpl::OpalDataImpl():
restart_dump_freq_m(1), last_step_m(0),
hasPriorRun_m(false),
isRestart_m(false),
restartStep_m(0),
hasRestartFile_m(false),
hasBunchAllocated_m(false),
hasDataSinkAllocated_m(false),
......@@ -178,7 +179,7 @@ OpalDataImpl::~OpalDataImpl() {
// Make sure the main directory is cleared before the directories
// for tables and expressions are deleted.
delete mesh_m;// somehow this needs to be deleted first
delete FL_m;
delete FL_m;
//delete PL_m; //this gets deleted by FL_m
delete bunch_m;
......@@ -615,7 +616,7 @@ void OpalData::printNames(std::ostream &os, const std::string &pattern) {
<< pattern << "\":" << endl;
for(ObjectDir::const_iterator index = p->mainDirectory.begin();
index != p->mainDirectory.end(); index++) {
index != p->mainDirectory.end(); ++index) {
const std::string name = (*index).first;
if(! name.empty() && regex.match(name)) {
......@@ -726,7 +727,7 @@ std::vector<std::string> OpalData::getAllNames() {
std::vector<std::string> result;
for(ObjectDir::const_iterator index = p->mainDirectory.begin();
index != p->mainDirectory.end(); index++) {
index != p->mainDirectory.end(); ++index) {
std::string tmpName = (*index).first;
if(!tmpName.empty()) result.push_back(tmpName);
//// DTA
......@@ -747,7 +748,7 @@ std::vector<std::string> OpalData::getAllNames() {
// StringStream *ss;
// ss = new StringStream("myVar:=ALPHA+BETA;");
for(ObjectDir::const_iterator index = p->mainDirectory.begin();
index != p->mainDirectory.end(); index++) {
index != p->mainDirectory.end(); ++index) {
std::string tmpName = (*index).first;
if(!tmpName.empty()) {
Object *tmpObject = OpalData::getInstance()->find(tmpName);
......
......@@ -10,7 +10,6 @@
#include "Algorithms/Tracker.h"
#include "Structure/DataSink.h"
#include "Utilities/Options.h"
#include "Utilities/Options.h"
#include "Physics/Physics.h"
......
......@@ -24,7 +24,6 @@
#include "BasicActions/Option.h"
#include "Utilities/Options.h"
#include "Utilities/Options.h"
#include "Physics/Physics.h"
......
......@@ -152,8 +152,8 @@ void StatisticalErrors::execute() {
void StatisticalErrors::runSimulation(const std::string &inputFileName, MPI_Comm comm) {
IpplInfoWrapper *newippl = new IpplInfoWrapper(inputFileName, comm);
unsigned int startExtension = inputFileName.find_last_of('.');
unsigned int startRelativePath = inputFileName.find_last_of('/');
std::string::size_type startExtension = inputFileName.find_last_of('.');
std::string::size_type startRelativePath = inputFileName.find_last_of('/');
std::string relativePath("");
if (startRelativePath != std::string::npos) {
relativePath = inputFileName.substr(0, startRelativePath + 1);
......
......@@ -12,9 +12,6 @@
$Id: error.C 91 2007-05-06 17:47:45Z bakker $
*/
#define SVN_DATE "$Date: 2007-05-06 19:47:45 +0200 (Sun, 06 May 2007) $"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
......
......@@ -12,7 +12,6 @@
$Id: profile.C 106 2007-05-08 19:12:24Z bakker $
*/
#define SVN_DATE "$Date: 2007-05-08 21:12:24 +0200 (Tue, 08 May 2007) $"
#include "Ippl.h"
#include <iostream>
#include <cmath>
......
......@@ -27,7 +27,6 @@
#include <string>
#include <map>
class ElementBase;
class Channel;
class ConstChannel;
......
......@@ -22,7 +22,6 @@
// ------------------------------------------------------------------------
// Generic element classes interacting with a BeamlineVisitor.
class ElementBase;
class Component;
// Beam line structure classes.
......
......@@ -22,9 +22,7 @@
// ------------------------------------------------------------------------
#include "AbsBeamline/BendBase.h"
#include "Fields/BMultipoleField.h"
#include "Algorithms/PartPusher.h"
#include "Physics/Physics.h"
#include "Utilities/GeneralClassicException.h"
#include "gsl/gsl_spline.h"
......
......@@ -23,11 +23,10 @@
// ------------------------------------------------------------------------
#include "AbsBeamline/Component.h"
#include "AbsBeamline/BeamlineVisitor.h"
#include "BeamlineGeometry/StraightGeometry.h"
#include <vector>
class BeamlineVisitor;
class LossDataSink;
// Class Collimator
......
......@@ -148,7 +148,7 @@ public:
virtual ElementBase::ElementType getType() const;
virtual void setComponentType(std::string name) { };
virtual void setComponentType(std::string /*name*/) { };
virtual std::string getComponentType() const { return ""; };
/// Return design element.
......
......@@ -23,7 +23,9 @@
#include "AbsBeamline/Component.h"
#include "BeamlineGeometry/PlanarArcGeometry.h"
#include "Fields/BMultipoleField.h"
#include <string>
#include <vector>
class Fieldmap;
class LossDataSink;
......
......@@ -35,7 +35,6 @@
#include <string>
#include <queue>
class Beamline;
class BeamlineVisitor;
class Channel;
class ConstChannel;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment