Skip to content
Snippets Groups Projects
Commit 35303514 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Roll-back the introducion of forward declaration where unnecessary

parent 0aa62d11
Branches
Tags
1 merge request!182Coding style
...@@ -26,8 +26,10 @@ ...@@ -26,8 +26,10 @@
/* Includes. */ /* Includes. */
#include "lock.h" #include "lock.h"
#include "multipole.h" #include "multipole.h"
#include "part.h"
#include "task.h"
/* Forward declaration of space, needed for cell_unpack. */ /* Avoid cyclic inclusions */
struct space; struct space;
/* Max tag size set to 2^29 to take into account some MPI implementations /* Max tag size set to 2^29 to take into account some MPI implementations
......
...@@ -25,10 +25,8 @@ ...@@ -25,10 +25,8 @@
#if defined(HAVE_HDF5) #if defined(HAVE_HDF5)
/* Forward-declare stuff to avoid cyclic includes. */ #include "part.h"
struct UnitSystem; #include "units.h"
struct part;
struct gpart;
/** /**
* @brief The different types of data used in the GADGET IC files. * @brief The different types of data used in the GADGET IC files.
...@@ -107,6 +105,6 @@ void writeXMFline(FILE* xmfFile, char* fileName, char* partTypeGroupName, ...@@ -107,6 +105,6 @@ void writeXMFline(FILE* xmfFile, char* fileName, char* partTypeGroupName,
void writeCodeDescription(hid_t h_file); void writeCodeDescription(hid_t h_file);
void writeUnitSystem(hid_t h_file, struct UnitSystem* us); void writeUnitSystem(hid_t h_file, struct UnitSystem* us);
#endif #endif /* defined HDF5 */
#endif /* SWIFT_COMMON_IO_H */ #endif /* SWIFT_COMMON_IO_H */
...@@ -27,11 +27,10 @@ ...@@ -27,11 +27,10 @@
#include <mpi.h> #include <mpi.h>
#endif #endif
/* Forward-declare stuff to avoid cyclic includes. */ /* Includes. */
struct engine; #include "engine.h"
struct gpart; #include "part.h"
struct part; #include "units.h"
struct UnitSystem;
#if defined(HAVE_HDF5) && defined(WITH_MPI) && defined(HAVE_PARALLEL_HDF5) #if defined(HAVE_HDF5) && defined(WITH_MPI) && defined(HAVE_PARALLEL_HDF5)
......
...@@ -32,13 +32,10 @@ ...@@ -32,13 +32,10 @@
#include <pthread.h> #include <pthread.h>
/* Includes. */ /* Includes. */
#include "cell.h"
#include "lock.h" #include "lock.h"
#include "queue.h"
/* Forward-declare stuff to avoid cyclic includes. */ #include "task.h"
struct cell;
struct queue;
struct space;
struct task;
/* Some constants. */ /* Some constants. */
#define scheduler_maxwait 3 #define scheduler_maxwait 3
......
...@@ -27,11 +27,10 @@ ...@@ -27,11 +27,10 @@
#include <mpi.h> #include <mpi.h>
#endif #endif
/* Forward-declare stuff to avoid cyclic includes. */ /* Includes. */
struct engine; #include "engine.h"
struct gpart; #include "part.h"
struct part; #include "units.h"
struct UnitSystem;
#if defined(HAVE_HDF5) && defined(WITH_MPI) && !defined(HAVE_PARALLEL_HDF5) #if defined(HAVE_HDF5) && defined(WITH_MPI) && !defined(HAVE_PARALLEL_HDF5)
......
...@@ -22,11 +22,10 @@ ...@@ -22,11 +22,10 @@
/* Config parameters. */ /* Config parameters. */
#include "../config.h" #include "../config.h"
/* Forward-declare stuff to avoid cyclic includes. */ /* Includes. */
struct engine; #include "engine.h"
struct gpart; #include "part.h"
struct part; #include "units.h"
struct UnitSystem;
#if defined(HAVE_HDF5) && !defined(WITH_MPI) #if defined(HAVE_HDF5) && !defined(WITH_MPI)
......
...@@ -23,13 +23,18 @@ ...@@ -23,13 +23,18 @@
#ifndef SWIFT_SPACE_H #ifndef SWIFT_SPACE_H
#define SWIFT_SPACE_H #define SWIFT_SPACE_H
/* Includes. */ /* Config parameters. */
#include "../config.h"
/* Some standard headers. */
#include <stddef.h> #include <stddef.h>
/* Includes. */
#include "cell.h"
#include "lock.h" #include "lock.h"
#include "parser.h"
/* Forward-declare stuff to avoid cyclic includes. */ #include "part.h"
struct swift_params; #include "space.h"
/* Some constants. */ /* Some constants. */
#define space_maxdepth 10 #define space_maxdepth 10
......
...@@ -22,11 +22,13 @@ ...@@ -22,11 +22,13 @@
#ifndef SWIFT_TOOL_H #ifndef SWIFT_TOOL_H
#define SWIFT_TOOL_H #define SWIFT_TOOL_H
/* Forward-declare stuff to avoid cyclic includes. */ /* Config parameters. */
struct cell; #include "../config.h"
struct gpart;
struct part; /* Includes. */
struct runner; #include "cell.h"
#include "part.h"
#include "runner.h"
void factor(int value, int *f1, int *f2); void factor(int value, int *f1, int *f2);
void density_dump(int N); void density_dump(int N);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment