Browse Source

Fix vs2017 build

pull/209/head
sigman 9 years ago
parent
commit
9c5a53167a
  1. 1
      src/Magnum/Math/Algorithms/Test/KahanSumTest.cpp
  2. 2
      src/Magnum/Math/Test/DualTest.cpp
  3. 2
      src/MagnumPlugins/MagnumFont/MagnumFont.cpp

1
src/Magnum/Math/Algorithms/Test/KahanSumTest.cpp

@ -68,6 +68,7 @@ template<class T> struct Iterator
{ {
explicit Iterator(T value, std::size_t i = 0): _value{value}, _i{i} {} explicit Iterator(T value, std::size_t i = 0): _value{value}, _i{i} {}
bool operator==(const Iterator& other) const { return _i == other._i; }
bool operator!=(const Iterator& other) const { return _i != other._i; } bool operator!=(const Iterator& other) const { return _i != other._i; }
Iterator& operator++() { Iterator& operator++() {

2
src/Magnum/Math/Test/DualTest.cpp

@ -106,9 +106,11 @@ void DualTest::construct() {
CORRADE_COMPARE(b, 2.0f); CORRADE_COMPARE(b, 2.0f);
CORRADE_COMPARE(c, -7.5f); CORRADE_COMPARE(c, -7.5f);
#if !defined(_MSC_VER) || (_MSC_VER > 1910)
constexpr Dual d(3.0f); constexpr Dual d(3.0f);
CORRADE_COMPARE(d.real(), 3.0f); CORRADE_COMPARE(d.real(), 3.0f);
CORRADE_COMPARE(d.dual(), 0.0f); CORRADE_COMPARE(d.dual(), 0.0f);
#endif
CORRADE_VERIFY((std::is_nothrow_constructible<Dual, Float, Float>::value)); CORRADE_VERIFY((std::is_nothrow_constructible<Dual, Float, Float>::value));
} }

2
src/MagnumPlugins/MagnumFont/MagnumFont.cpp

@ -76,7 +76,7 @@ auto MagnumFont::doOpenData(const std::vector<std::pair<std::string, Containers:
} }
/* Open the configuration file */ /* Open the configuration file */
std::istringstream in({data[0].second.begin(), data[0].second.size()}); std::istringstream in(std::string{data[0].second.begin(), data[0].second.size()});
Utility::Configuration conf(in, Utility::Configuration::Flag::SkipComments); Utility::Configuration conf(in, Utility::Configuration::Flag::SkipComments);
if(!conf.isValid() || conf.isEmpty()) { if(!conf.isValid() || conf.isEmpty()) {
Error() << "Text::MagnumFont::openData(): cannot open file" << data[0].first; Error() << "Text::MagnumFont::openData(): cannot open file" << data[0].first;

Loading…
Cancel
Save