Commit 0b5ebeb4 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

More pointer const-correctness

parent 47203584
......@@ -502,7 +502,7 @@ void writeXMFline(FILE* xmfFile, char* fileName, char* partTypeGroupName,
* @param gparts The array of #gpart freshly read in.
* @param Ndm The number of DM particles read in.
*/
void prepare_dm_gparts(struct gpart* gparts, size_t Ndm) {
void prepare_dm_gparts(struct gpart *const gparts, size_t Ndm) {
/* Let's give all these gparts a negative id */
for (size_t i = 0; i < Ndm; ++i) {
......@@ -527,7 +527,7 @@ void prepare_dm_gparts(struct gpart* gparts, size_t Ndm) {
* @param Ngas The number of gas particles read in.
* @param Ndm The number of DM particles read in.
*/
void duplicate_hydro_gparts(struct part* parts, struct gpart* gparts,
void duplicate_hydro_gparts(struct part *const parts, struct gpart *const gparts,
size_t Ngas, size_t Ndm) {
for (size_t i = 0; i < Ngas; ++i) {
......@@ -557,7 +557,7 @@ void duplicate_hydro_gparts(struct part* parts, struct gpart* gparts,
* @param dmparts The array of #gpart containg DM particles to be filled.
* @param Ndm The number of DM particles.
*/
void collect_dm_gparts(struct gpart* gparts, size_t Ntot, struct gpart* dmparts,
void collect_dm_gparts(const struct gpart *const gparts, size_t Ntot, struct gpart *const dmparts,
size_t Ndm) {
size_t count = 0;
......
......@@ -78,10 +78,10 @@ extern const char* particle_type_names[];
hid_t hdf5Type(enum DATA_TYPE type);
size_t sizeOfType(enum DATA_TYPE type);
void collect_dm_gparts(struct gpart* gparts, size_t Ntot, struct gpart* dmparts,
void collect_dm_gparts(const struct gpart *const gparts, size_t Ntot, struct gpart *const dmparts,
size_t Ndm);
void prepare_dm_gparts(struct gpart* gparts, size_t Ndm);
void duplicate_hydro_gparts(struct part* parts, struct gpart* gparts,
void prepare_dm_gparts(struct gpart *const gparts, size_t Ndm);
void duplicate_hydro_gparts(struct part *const parts, struct gpart *const gparts,
size_t Ngas, size_t Ndm);
void readAttribute(hid_t grp, char* name, enum DATA_TYPE type, void* data);
......
Supports Markdown
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