Fix build on MacOS.

This commit is contained in:
Jeff Young 2023-10-08 20:08:24 +01:00
parent 21adc0aac5
commit 5793abd310
2 changed files with 6 additions and 0 deletions

View File

@ -181,6 +181,8 @@ std::string EDA_UNIT_UTILS::FormatInternalUnits( const EDA_IU_SCALE& aIuScale,
}
#if 0 // No support for std::from_chars on MacOS yet
bool EDA_UNIT_UTILS::ParseInternalUnits( const std::string& aInput, const EDA_IU_SCALE& aIuScale,
int& aOut )
{
@ -218,6 +220,8 @@ bool EDA_UNIT_UTILS::ParseInternalUnits( const std::string& aInput, const EDA_IU
return true;
}
#endif
#define IU_TO_MM( x, scale ) ( x / scale.IU_PER_MM )
#define IU_TO_IN( x, scale ) ( x / scale.IU_PER_MILS / 1000 )

View File

@ -122,6 +122,7 @@ namespace EDA_UNIT_UTILS
KICOMMON_API std::string FormatInternalUnits( const EDA_IU_SCALE& aIuScale,
const VECTOR2I& aPoint );
#if 0 // No support for std::from_chars on MacOS yet
/**
* Converts \a aInput string to internal units when reading from a file.
*
@ -147,6 +148,7 @@ namespace EDA_UNIT_UTILS
*/
KICOMMON_API bool ParseInternalUnits( const std::string& aInput, const EDA_IU_SCALE& aIuScale,
VECTOR2I& aOut );
#endif
constexpr inline int Mils2IU( const EDA_IU_SCALE& aIuScale, int mils )
{