Unable to compile

I’m trying to compile experimental version, downloaded from Github, and I’m unable to do that. That’s what I’m getting:

g++ -DGIT_VERSION -DLOCALIZE -ffast-math -Og -Wall -Wextra -g -D_GLIBCXX_DEBUG -std=c++11 -MMD -c src/mondeath.cpp -o obj/mondeath.o src/mondeath.cpp: In function 'void mdeath::normal(monster*)': src/mondeath.cpp:82:94: error: no matching function for call to 'min(float, double)' const int number_of_gibs = std::min( floor( corpseDamage ) - 1, 1 + max_hp / 5.0 ) + ( is_big_beast ? rng( 1, 6 ) : 0 ); ^ In file included from /usr/include/c++/6.1.1/bits/char_traits.h:39:0, from /usr/include/c++/6.1.1/string:40, from src/json.h:6, from src/pldata.h:4, from src/creature.h:4, from src/monster.h:4, from src/mondeath.cpp:2: /usr/include/c++/6.1.1/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^~~ /usr/include/c++/6.1.1/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed: src/mondeath.cpp:82:94: note: deduced conflicting types for parameter 'const _Tp' ('float' and 'double') const int number_of_gibs = std::min( floor( corpseDamage ) - 1, 1 + max_hp / 5.0 ) + ( is_big_beast ? rng( 1, 6 ) : 0 ); ^ In file included from /usr/include/c++/6.1.1/bits/char_traits.h:39:0, from /usr/include/c++/6.1.1/string:40, from src/json.h:6, from src/pldata.h:4, from src/creature.h:4, from src/monster.h:4, from src/mondeath.cpp:2: /usr/include/c++/6.1.1/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^~~ /usr/include/c++/6.1.1/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed: src/mondeath.cpp:82:94: note: deduced conflicting types for parameter 'const _Tp' ('float' and 'double') const int number_of_gibs = std::min( floor( corpseDamage ) - 1, 1 + max_hp / 5.0 ) + ( is_big_beast ? rng( 1, 6 ) : 0 ); ^ In file included from /usr/include/c++/6.1.1/algorithm:62:0, from src/damage.h:10, from src/mtype.h:10, from src/mondeath.cpp:16: /usr/include/c++/6.1.1/bits/stl_algo.h:3454:5: note: candidate: template<class _Tp> _Tp std::min(std::initializer_list<_Tp>) min(initializer_list<_Tp> __l) ^~~ /usr/include/c++/6.1.1/bits/stl_algo.h:3454:5: note: template argument deduction/substitution failed: src/mondeath.cpp:82:94: note: mismatched types 'std::initializer_list<_Tp>' and 'float' const int number_of_gibs = std::min( floor( corpseDamage ) - 1, 1 + max_hp / 5.0 ) + ( is_big_beast ? rng( 1, 6 ) : 0 ); ^ In file included from /usr/include/c++/6.1.1/algorithm:62:0, from src/damage.h:10, from src/mtype.h:10, from src/mondeath.cpp:16: /usr/include/c++/6.1.1/bits/stl_algo.h:3460:5: note: candidate: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare) min(initializer_list<_Tp> __l, _Compare __comp) ^~~ /usr/include/c++/6.1.1/bits/stl_algo.h:3460:5: note: template argument deduction/substitution failed: src/mondeath.cpp:82:94: note: mismatched types 'std::initializer_list<_Tp>' and 'float' const int number_of_gibs = std::min( floor( corpseDamage ) - 1, 1 + max_hp / 5.0 ) + ( is_big_beast ? rng( 1, 6 ) : 0 ); ^ Makefile:623: recipe for target 'obj/mondeath.o' failed make: *** [obj/mondeath.o] Error 1

Using Antergos Linux (Arch derivative). I’d be very grateful for any help.

In src/mondeath.cpp line 82, try changing 1 + max_hp / 5.0 ) to float(1 + max_hp / 5.0 )).

Not sure if there need to be changes elsewhere, but it seems to work for me.

[quote=“MKuchera, post:2, topic:11965”]In src/mondeath.cpp line 82, try changing 1 + max_hp / 5.0 ) to float(1 + max_hp / 5.0 )).

Not sure if there need to be changes elsewhere, but it seems to work for me.[/quote]

Sadly, that didn’t help, still getting the same errors.

Edit: Disregard all the above, I’m blind and missed the “float” part. Your advice worked, thanks a lot!