Skip to content

Commit

Permalink
[srs] Add workaround for msvc-12 faulty array initialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
awulkiew committed Jul 16, 2018
1 parent f3e1254 commit 1b3cab8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions include/boost/geometry/srs/projections/impl/dms_parser.hpp
Expand Up @@ -123,16 +123,16 @@ struct dms_parser
bool has_dms[3];

dms_value()
#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && (!defined(_MSC_VER) || (_MSC_VER >= 1900)) // workaround for VC++ 12 (aka 2013)
: dms{0, 0, 0}
, has_dms{false, false, false}
#endif
{}
#else
{
#ifdef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
std::fill(dms, dms + 3, T(0));
std::fill(has_dms, has_dms + 3, false);
#endif
}
#endif
};


Expand Down
4 changes: 2 additions & 2 deletions include/boost/geometry/srs/projections/impl/projects.hpp
Expand Up @@ -209,12 +209,12 @@ struct pj_consts
, x0(0), y0(0)/*, z0(0), t0(0)*/
, k0(0) , to_meter(0), fr_meter(0), vto_meter(0), vfr_meter(0)
, datum_type(datum_unknown)
#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && (!defined(_MSC_VER) || (_MSC_VER >= 1900)) // workaround for VC++ 12 (aka 2013)
, datum_params{0, 0, 0, 0, 0, 0, 0}
#endif
, from_greenwich(0), long_wrap_center(0), is_long_wrap_set(false)
{
#ifdef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) || (defined(_MSC_VER) && (_MSC_VER < 1900)) // workaround for VC++ 12 (aka 2013)
std::fill(datum_params, datum_params + 7, T(0));
#endif
}
Expand Down

0 comments on commit 1b3cab8

Please sign in to comment.