Skip to content

Commit

Permalink
constexpr -> const
Browse files Browse the repository at this point in the history
We don't need constexpr and this was restricting compiler to c++11 or
later
  • Loading branch information
jaxxzer committed Apr 10, 2017
1 parent 0cbdded commit 96432e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions MS5837.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
#define MS5837_CONVERT_D1_8192 0x4A
#define MS5837_CONVERT_D2_8192 0x5A

const float MS5837::Pa = 100.0f;
const float MS5837::bar = 0.001f;
const float MS5837::mbar = 1.0f;

const uint8_t MS5837::MS5837_30BA = 0;
const uint8_t MS5837::MS5837_02BA = 1;

MS5837::MS5837() {
fluidDensity = 1029;
}
Expand Down
10 changes: 5 additions & 5 deletions MS5837.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ THE SOFTWARE.

class MS5837 {
public:
static constexpr float Pa = 100.0f;
static constexpr float bar = 0.001f;
static constexpr float mbar = 1.0f;
static const float Pa;
static const float bar;
static const float mbar;

static constexpr uint8_t MS5837_30BA = 0;
static constexpr uint8_t MS5837_02BA = 1;
static const uint8_t MS5837_30BA;
static const uint8_t MS5837_02BA;

MS5837();

Expand Down

0 comments on commit 96432e2

Please sign in to comment.