Skip to content

Commit

Permalink
Remove unused includes
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomofiorin committed Dec 1, 2023
1 parent 14281bc commit 0e5b3fe
Show file tree
Hide file tree
Showing 30 changed files with 19 additions and 51 deletions.
2 changes: 1 addition & 1 deletion src/colvar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "colvarparse.h"
#include "colvarcomp.h"
#include "colvar.h"
#include "colvarscript.h"
#include "colvarbias.h"
#include "colvars_memstream.h"


Expand Down
1 change: 1 addition & 0 deletions src/colvar.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define COLVAR_H

#include <functional>
#include <list>
#include <iosfwd>
#include <map>

Expand Down
1 change: 0 additions & 1 deletion src/colvarbias_alb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include <iostream>
#include <iomanip>
#include <cstdlib>

#include "colvarmodule.h"
#include "colvarproxy.h"
Expand Down
2 changes: 0 additions & 2 deletions src/colvarbias_meta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
// If you wish to distribute your changes, please submit them to the
// Colvars repository at GitHub.

#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
Expand Down
2 changes: 0 additions & 2 deletions src/colvarcomp.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
// this can be done straightforwardly by using the macro:
// simple_scalar_dist_functions (derived_class)

#include <functional>
#include <map>
#include <memory>

#include "colvarmodule.h"
Expand Down
1 change: 0 additions & 1 deletion src/colvarcomp_alchlambda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include "colvarmodule.h"
#include "colvarvalue.h"
#include "colvarparse.h"
#include "colvar.h"
#include "colvarcomp.h"

Expand Down
2 changes: 0 additions & 2 deletions src/colvarcomp_apath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@

#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <limits>
#include <numeric>

#include "colvarvalue.h"
#include "colvarparse.h"
#include "colvar.h"
#include "colvarcomp.h"
#include "colvar_arithmeticpath.h"
Expand Down
1 change: 0 additions & 1 deletion src/colvarcomp_coordnums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// Colvars repository at GitHub.

#include "colvarmodule.h"
#include "colvarparse.h"
#include "colvaratoms.h"
#include "colvarvalue.h"
#include "colvar.h"
Expand Down
1 change: 0 additions & 1 deletion src/colvarcomp_distances.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "colvarmodule.h"
#include "colvarvalue.h"
#include "colvarparse.h"
#include "colvar.h"
#include "colvarcomp.h"
#include "colvar_rotation_derivative.h"
Expand Down
2 changes: 0 additions & 2 deletions src/colvarcomp_gpath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@
#include <numeric>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <limits>
#include <fstream>

#include "colvarmodule.h"
#include "colvarvalue.h"
#include "colvarparse.h"
#include "colvar.h"
#include "colvarcomp.h"

Expand Down
1 change: 0 additions & 1 deletion src/colvarcomp_neuralnetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "colvarmodule.h"
#include "colvarvalue.h"
#include "colvarparse.h"
#include "colvar.h"
#include "colvarcomp.h"
#include "colvar_neuralnetworkcompute.h"
Expand Down
1 change: 0 additions & 1 deletion src/colvarcomp_protein.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "colvarmodule.h"
#include "colvarvalue.h"
#include "colvarparse.h"
#include "colvar.h"
#include "colvarcomp.h"

Expand Down
1 change: 0 additions & 1 deletion src/colvarcomp_rotations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "colvarmodule.h"
#include "colvarvalue.h"
#include "colvarparse.h"
#include "colvar.h"
#include "colvarcomp.h"
#include "colvar_rotation_derivative.h"
Expand Down
1 change: 0 additions & 1 deletion src/colvarcomp_volmaps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "colvarmodule.h"
#include "colvarvalue.h"
#include "colvarparse.h"
#include "colvar.h"
#include "colvarcomp.h"

Expand Down
2 changes: 0 additions & 2 deletions src/colvargrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
// Colvars repository at GitHub.

#include <ctime>
#include <fstream>

#include "colvarmodule.h"
#include "colvarvalue.h"
#include "colvarparse.h"
#include "colvar.h"
#include "colvarcomp.h"
#include "colvargrid.h"
#include "colvargrid_def.h"

Expand Down
6 changes: 1 addition & 5 deletions src/colvarmodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
// If you wish to distribute your changes, please submit them to the
// Colvars repository at GitHub.

#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <sstream>
#include <memory>
#include <vector>

#include "colvarmodule.h"
Expand Down
9 changes: 2 additions & 7 deletions src/colvarmodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#ifndef COLVARMODULE_H
#define COLVARMODULE_H

#include <cmath>

#include "colvars_version.h"

#ifndef COLVARS_DEBUG
Expand All @@ -35,16 +33,15 @@ Please note that this documentation is only supported for the master branch, and
/// shared between all object instances) to be accessed from other
/// objects.

#include <cmath>
#include <iosfwd>
#include <string>
#include <vector>
#include <list>
#include <iosfwd>

class colvarparse;
class colvar;
class colvarbias;
class colvarproxy;
class colvarscript;
class colvarvalue;


Expand Down Expand Up @@ -82,8 +79,6 @@ class colvarmodule {
}

friend class colvarproxy;
// TODO colvarscript should be unaware of colvarmodule's internals
friend class colvarscript;

/// Use a 64-bit integer to store the step number
typedef long long step_number;
Expand Down
1 change: 0 additions & 1 deletion src/colvarparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// Colvars repository at GitHub.

#include <sstream>
#include <iostream>
#include <algorithm>

#include "colvarmodule.h"
Expand Down
1 change: 1 addition & 0 deletions src/colvarparse.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define COLVARPARSE_H

#include <cstring>
#include <list>
#include <string>

#include "colvarmodule.h"
Expand Down
3 changes: 2 additions & 1 deletion src/colvarproxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@

#include "colvarmodule.h"
#include "colvarproxy.h"
#include "colvar.h"
#include "colvarbias.h"
#include "colvarscript.h"
#include "colvaratoms.h"
#include "colvarmodule_utils.h"


Expand Down
1 change: 0 additions & 1 deletion src/colvarproxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include "colvarmodule.h"
#include "colvartypes.h"
#include "colvarvalue.h"
#include "colvarproxy_io.h"
#include "colvarproxy_system.h"
#include "colvarproxy_tcl.h"
Expand Down
3 changes: 2 additions & 1 deletion src/colvarproxy_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
#ifndef COLVARPROXY_IO_H
#define COLVARPROXY_IO_H

#include <iosfwd>
#include <list>
#include <map>
#include <string>
#include <iosfwd>


/// Methods for data input/output
Expand Down
4 changes: 1 addition & 3 deletions src/colvarscript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
// If you wish to distribute your changes, please submit them to the
// Colvars repository at GitHub.

#include <cstdlib>
#include <cstring>
#include <sstream>

#include "colvarproxy.h"
Expand Down Expand Up @@ -769,7 +767,7 @@ extern "C" int tcl_run_colvarscript_command(ClientData /* clientData */,
int colvarscript::set_result_text_from_str(std::string const &x_str,
unsigned char *obj) {
if (obj) {
strcpy(reinterpret_cast<char *>(obj), x_str.c_str());
std::memcpy(reinterpret_cast<char *>(obj), x_str.c_str(), x_str.size());
} else {
set_result_str(x_str);
}
Expand Down
3 changes: 2 additions & 1 deletion src/colvarscript.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#include "colvarmodule.h"
#include "colvarvalue.h"
#include "colvarbias.h"
#include "colvarproxy.h"


Expand All @@ -25,6 +24,8 @@
#define COLVARSCRIPT_OK 0


class colvardeps;

class colvarscript {

private:
Expand Down
4 changes: 2 additions & 2 deletions src/colvarscript_commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
// Colvars repository at GitHub.

#include <vector>
#include <cstdlib>
#include <string.h>

#include "colvar.h"
#include "colvarbias.h"
#include "colvarproxy.h"
#include "colvardeps.h"
#include "colvarscript.h"
Expand Down
4 changes: 1 addition & 3 deletions src/colvarscript_commands_bias.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@


#include <vector>
#include <cstdlib>
#include <stdlib.h>
#include <string.h>

#include "colvarproxy.h"
#include "colvarbias.h"
#include "colvardeps.h"
#include "colvarscript.h"
#include "colvarscript_commands.h"
Expand Down
2 changes: 1 addition & 1 deletion src/colvarscript_commands_colvar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include <vector>
#include <cstdlib>
#include <stdlib.h>
#include <string.h>

#include "colvar.h"
#include "colvarproxy.h"
#include "colvardeps.h"
#include "colvarscript.h"
Expand Down
4 changes: 0 additions & 4 deletions src/colvartypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
// If you wish to distribute your changes, please submit them to the
// Colvars repository at GitHub.

#include <cstdlib>
#include <cstring>

#include "colvarmodule.h"
#include "colvartypes.h"
#include "colvarparse.h"
#include "colvaratoms.h"
#include "colvar_rotation_derivative.h"

Expand Down
2 changes: 0 additions & 2 deletions src/colvarvalue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// Colvars repository at GitHub.

#include <vector>
#include <sstream>
#include <iostream>

#include "colvarmodule.h"
#include "colvarvalue.h"
Expand Down
2 changes: 2 additions & 0 deletions src/colvarvalue.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#ifndef COLVARVALUE_H
#define COLVARVALUE_H

#include <list>

#include "colvarmodule.h"
#include "colvartypes.h"

Expand Down

0 comments on commit 0e5b3fe

Please sign in to comment.