Fix compilation on VS2013 due to compiler bug with brace initialisers. This fixes issue #2678.
parent
8a4c35598e
commit
e6a051d953
|
@ -67,7 +67,20 @@ using namespace Assimp;
|
||||||
// Constructor to be privately used by Importer
|
// Constructor to be privately used by Importer
|
||||||
BaseImporter::BaseImporter() AI_NO_EXCEPT
|
BaseImporter::BaseImporter() AI_NO_EXCEPT
|
||||||
: m_progress() {
|
: m_progress() {
|
||||||
// nothing to do here
|
/**
|
||||||
|
* Assimp Importer
|
||||||
|
* unit conversions available
|
||||||
|
* if you need another measurment unit add it below.
|
||||||
|
* it's currently defined in assimp that we prefer meters.
|
||||||
|
*
|
||||||
|
* NOTE: Initialised here rather than in the header file
|
||||||
|
* to workaround a VS2013 bug with brace initialisers
|
||||||
|
* */
|
||||||
|
importerUnits[ImporterUnits::M] = 1.0;
|
||||||
|
importerUnits[ImporterUnits::CM] = 0.01;
|
||||||
|
importerUnits[ImporterUnits::MM] = 0.001;
|
||||||
|
importerUnits[ImporterUnits::INCHES] = 0.0254;
|
||||||
|
importerUnits[ImporterUnits::FEET] = 0.3048;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -196,16 +196,13 @@ public:
|
||||||
/**
|
/**
|
||||||
* Assimp Importer
|
* Assimp Importer
|
||||||
* unit conversions available
|
* unit conversions available
|
||||||
* if you need another measurment unit add it below.
|
* NOTE: Valid options are initialised in the
|
||||||
* it's currently defined in assimp that we prefer meters.
|
* constructor in the implementation file to
|
||||||
|
* work around a VS2013 compiler bug if support
|
||||||
|
* for that compiler is dropped in the future
|
||||||
|
* initialisation can be moved back here
|
||||||
* */
|
* */
|
||||||
std::map<ImporterUnits, double> importerUnits = {
|
std::map<ImporterUnits, double> importerUnits;
|
||||||
{ImporterUnits::M, 1},
|
|
||||||
{ImporterUnits::CM, 0.01},
|
|
||||||
{ImporterUnits::MM, 0.001},
|
|
||||||
{ImporterUnits::INCHES, 0.0254},
|
|
||||||
{ImporterUnits::FEET, 0.3048}
|
|
||||||
};
|
|
||||||
|
|
||||||
virtual void SetApplicationUnits( const ImporterUnits& unit )
|
virtual void SetApplicationUnits( const ImporterUnits& unit )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue