MSVC build fixes
parent
6c9fa5194d
commit
e658aed6bd
|
@ -81,6 +81,11 @@ if(MSVC)
|
||||||
WINDOWS_LEAN_AND_MEAN
|
WINDOWS_LEAN_AND_MEAN
|
||||||
NOMINMAX
|
NOMINMAX
|
||||||
)
|
)
|
||||||
|
# Avoid literally hundreds to thousands of warnings:
|
||||||
|
list_append_cache(GTSAM_COMPILE_OPTIONS_PUBLIC
|
||||||
|
/wd4267 # warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
|
||||||
|
)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Other (non-preprocessor macros) compiler flags:
|
# Other (non-preprocessor macros) compiler flags:
|
||||||
|
|
|
@ -348,7 +348,9 @@ namespace gtsam {
|
||||||
throw ValuesKeyDoesNotExist("at", j);
|
throw ValuesKeyDoesNotExist("at", j);
|
||||||
|
|
||||||
// Check the type and throw exception if incorrect
|
// Check the type and throw exception if incorrect
|
||||||
return internal::handle<ValueType>()(j,item->second);
|
// h() split in two lines to avoid internal compiler error (MSVC2017)
|
||||||
|
auto h = internal::handle<ValueType>();
|
||||||
|
return h(j,item->second);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
|
Loading…
Reference in New Issue