1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-28 10:08:24 +00:00
freebsd-ports/cad/libopencad/files/patch-lib_cadheader.cpp
Piotr Kubaj f91e6f96c6 cad/libopencad: fix build on armv? / powerpc
/wrkdirs/usr/ports/cad/libopencad/work/libopencad-0.2.0/lib/cadheader.cpp:478:28: error: ambiguous conversion for functional-style cast from 'time_t' (aka 'long long') to 'CADVariant'
    return addValue( code, CADVariant( fullSeconds ) );
                           ^~~~~~~~~~~~~~~~~~~~~~~
2023-03-13 00:02:41 +00:00

41 lines
970 B
C++

--- lib/cadheader.cpp.orig 2016-08-24 13:25:41 UTC
+++ lib/cadheader.cpp
@@ -243,6 +243,28 @@ CADVariant::CADVariant( const char * val )
dateTimeVal = 0;
}
+CADVariant::CADVariant( long val )
+{
+ type = DataType ::DECIMAL;
+ decimalVal = val;
+ stringVal = to_string( decimalVal );
+ xVal = 0;
+ yVal = 0;
+ zVal = 0;
+ dateTimeVal = 0;
+}
+
+CADVariant::CADVariant( long long val )
+{
+ type = DataType ::DECIMAL;
+ decimalVal = val;
+ stringVal = to_string( decimalVal );
+ xVal = 0;
+ yVal = 0;
+ zVal = 0;
+ dateTimeVal = 0;
+}
+
CADVariant::CADVariant( int val )
{
type = DataType::DECIMAL;
@@ -303,7 +325,7 @@ CADVariant::CADVariant( const string& val )
dateTimeVal = 0;
}
-CADVariant::CADVariant( time_t val )
+CADVariant::CADVariant( time_t val, bool bIsTime )
{
type = DataType::DATETIME;
dateTimeVal = val;