Skip to content

Commit 9312a0d

Browse files
authored
Merge pull request #30 from rieder/issue-29
Fix for issue #29
2 parents ba13112 + 861f892 commit 9312a0d

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CXXFLAGS += -I./include -I./include/star -DHAVE_CONFIG_H -DTOOLBOX
1+
CXXFLAGS += -I./include -I./include/star -DHAVE_CONFIG_H -DTOOLBOX -Wconversion
22
LDLIBS += -Lsstar -lsstar -Lnode -lnode -Lstd -lstd -lm
33
CFLAGS += -O
44
CXXFLAGS += -O

Makefile.inc.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CXXFLAGS += -I__BASE__/include -I__BASE__/include/star -DHAVE_CONFIG_H
2-
CFLAGS += -O
3-
CXXFLAGS += -O
2+
CFLAGS += -O -Wconversion # -Werror=conversion
3+
CXXFLAGS += -O -Wconversion # -Werror=conversion
44

55

66

7-
CXXFLAGS += -D_SRC_='"no_source_available"'
7+
CXXFLAGS += -D_SRC_='"no_source_available"'

include/stdinc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ using std::flush;
134134
using std::min;
135135
using std::max;
136136
using std::ios;
137+
using std::abs;
137138

138139
//=============================================================================
139140
// New naming conventions to add to or replace existing names in C :

sstar/starclass/single_star.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3124,7 +3124,7 @@ real single_star::update_core_and_envelope_mass(const real m_core) {
31243124

31253125
bool successful_update = false;
31263126
real dm_core = m_core-core_mass;
3127-
3127+
31283128
if (m_core > get_total_mass()){
31293129
cerr << "single_star::update_core_and_envelope_mass limits new core mass to total mass." << endl;
31303130
real m_tot = get_total_mass();
@@ -3261,7 +3261,7 @@ real single_star::linear_function_inversion(real (single_star::*fptr)(real, cons
32613261
gx = gx_new;
32623262
within_range = 1;
32633263
}
3264-
while(abs(dy/y_value)>cnsts.safety(minimum_inversion_precision));
3264+
while(std::abs(dy/y_value)>cnsts.safety(minimum_inversion_precision));
32653265

32663266
// PRC(x_guess);PRL(gx);
32673267
// PRC(y_value);PRL((this->*fptr)(gx, z));

0 commit comments

Comments
 (0)