diff options
author | Thomas White <taw@physics.org> | 2020-06-10 12:04:06 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:53:44 +0200 |
commit | b029be4a077085aef818d3868e45297827902a01 (patch) | |
tree | dbdc9dd26241bd7e8f4e88b8d894edae607428b4 /libcrystfel/src | |
parent | 761026b65852d3ce1af632d2514b939f78170262 (diff) |
Const-cleaning
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/cell-utils.c | 2 | ||||
-rw-r--r-- | libcrystfel/src/cell-utils.h | 2 | ||||
-rw-r--r-- | libcrystfel/src/cell.c | 10 | ||||
-rw-r--r-- | libcrystfel/src/cell.h | 10 |
4 files changed, 12 insertions, 12 deletions
diff --git a/libcrystfel/src/cell-utils.c b/libcrystfel/src/cell-utils.c index d269e703..d5662971 100644 --- a/libcrystfel/src/cell-utils.c +++ b/libcrystfel/src/cell-utils.c @@ -868,7 +868,7 @@ static int get_angle_rad(char **bits, int nbits, double *pl) * Writes \p cell to \p fh, in CrystFEL unit cell file format * */ -void write_cell(UnitCell *cell, FILE *fh) +void write_cell(const UnitCell *cell, FILE *fh) { double a, b, c, al, be, ga; LatticeType lt; diff --git a/libcrystfel/src/cell-utils.h b/libcrystfel/src/cell-utils.h index 1c356588..05618385 100644 --- a/libcrystfel/src/cell-utils.h +++ b/libcrystfel/src/cell-utils.h @@ -61,7 +61,7 @@ extern void cell_print_full(UnitCell *cell); extern UnitCell *load_cell_from_pdb(const char *filename); extern UnitCell *load_cell_from_file(const char *filename); -extern void write_cell(UnitCell *cell, FILE *fh); +extern void write_cell(const UnitCell *cell, FILE *fh); extern int cell_is_sensible(UnitCell *cell); diff --git a/libcrystfel/src/cell.c b/libcrystfel/src/cell.c index f6ed412d..23a5e46b 100644 --- a/libcrystfel/src/cell.c +++ b/libcrystfel/src/cell.c @@ -157,7 +157,7 @@ void cell_free(UnitCell *cell) * \returns True if cell has its parameters specified. * */ -int cell_has_parameters(UnitCell *cell) +int cell_has_parameters(const UnitCell *cell) { if ( cell == NULL ) return 0; return cell->have_parameters; @@ -567,19 +567,19 @@ int cell_get_reciprocal(const UnitCell *cell, } -char cell_get_centering(UnitCell *cell) +char cell_get_centering(const UnitCell *cell) { return cell->centering; } -LatticeType cell_get_lattice_type(UnitCell *cell) +LatticeType cell_get_lattice_type(const UnitCell *cell) { return cell->lattice_type; } -struct g6 cell_get_G6(UnitCell *cell) +struct g6 cell_get_G6(const UnitCell *cell) { double a, b, c, al, be, ga; struct g6 g; @@ -594,7 +594,7 @@ struct g6 cell_get_G6(UnitCell *cell) } -char cell_get_unique_axis(UnitCell *cell) +char cell_get_unique_axis(const UnitCell *cell) { return cell->unique_axis; } diff --git a/libcrystfel/src/cell.h b/libcrystfel/src/cell.h index 3deb92ff..d201d059 100644 --- a/libcrystfel/src/cell.h +++ b/libcrystfel/src/cell.h @@ -101,7 +101,7 @@ extern UnitCell *cell_new_from_reciprocal_axes(struct rvec as, struct rvec bs, extern UnitCell *cell_new_from_direct_axes(struct rvec as, struct rvec bs, struct rvec cs); -extern int cell_has_parameters(UnitCell *cell); +extern int cell_has_parameters(const UnitCell *cell); extern void cell_set_cartesian(UnitCell *cell, double ax, double ay, double az, @@ -129,7 +129,7 @@ extern void cell_set_reciprocal(UnitCell *cell, double bsx, double bsy, double bsz, double csx, double csy, double csz); -extern LatticeType cell_get_lattice_type(UnitCell *cell); +extern LatticeType cell_get_lattice_type(const UnitCell *cell); extern void cell_set_lattice_type(UnitCell *cell, LatticeType lattice_type); struct g6 @@ -142,12 +142,12 @@ struct g6 double F; }; -extern struct g6 cell_get_G6(UnitCell *cell); +extern struct g6 cell_get_G6(const UnitCell *cell); -extern char cell_get_centering(UnitCell *cell); +extern char cell_get_centering(const UnitCell *cell); extern void cell_set_centering(UnitCell *cell, char centering); -extern char cell_get_unique_axis(UnitCell *cell); +extern char cell_get_unique_axis(const UnitCell *cell); extern void cell_set_unique_axis(UnitCell *cell, char unique_axis); extern const char *cell_rep(UnitCell *cell); |