From 31a734b03d620c9aef0ecacb53f2d251ca13e55e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 7 Jun 2017 17:10:33 -0400 Subject: [PATCH] sbmask function should be flagged as const indicating no side effects --- src/compute.h | 2 +- src/create_bonds.h | 2 +- src/delete_atoms.h | 2 +- src/pair.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compute.h b/src/compute.h index 7f12cd97e2..279f71829b 100644 --- a/src/compute.h +++ b/src/compute.h @@ -152,7 +152,7 @@ class Compute : protected Pointers { double **vbiasall; // stored velocity bias for all atoms int maxbias; // size of vbiasall array - inline int sbmask(int j) { + inline int sbmask(int j) const { return j >> SBBITS & 3; } diff --git a/src/create_bonds.h b/src/create_bonds.h index 2936506b3f..24b1596e37 100644 --- a/src/create_bonds.h +++ b/src/create_bonds.h @@ -30,7 +30,7 @@ class CreateBonds : protected Pointers { void command(int, char **); private: - inline int sbmask(int j) { + inline int sbmask(int j) const { return j >> SBBITS & 3; } }; diff --git a/src/delete_atoms.h b/src/delete_atoms.h index 62ba47d715..72cf44285f 100644 --- a/src/delete_atoms.h +++ b/src/delete_atoms.h @@ -45,7 +45,7 @@ class DeleteAtoms : protected Pointers { void recount_topology(); void options(int, char **); - inline int sbmask(int j) { + inline int sbmask(int j) const { return j >> SBBITS & 3; } diff --git a/src/pair.h b/src/pair.h index dd859e5f2a..b57004d965 100644 --- a/src/pair.h +++ b/src/pair.h @@ -245,7 +245,7 @@ class Pair : protected Pointers { ubuf(int arg) : i(arg) {} }; - inline int sbmask(int j) { + inline int sbmask(int j) const { return j >> SBBITS & 3; } };