]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/kernel/marParameters.cpp
#3138 creaMaracasVisu Feature New Normal - branch vtk7itk4wx3
[creaMaracasVisu.git] / lib / maracasVisuLib / src / kernel / marParameters.cpp
index b201515ddea4f6c5f988fa77c01057016077d368..d2d5ae212cd7265a0a6be5b80e3f5f978c3a7518 100644 (file)
@@ -302,6 +302,7 @@ bool marParameters::load( std::ifstream& is )
        int i, s;
        try
        {
+               char tmp[500];
                is.read( ( char* )_boolValues, e_bool_cont * sizeof( bool ) );
                is.read( ( char* )_intValues, e_int_cont * sizeof( int ) );
                is.read( ( char* )_doubleValues, e_double_cont * sizeof( double ) );
@@ -309,7 +310,13 @@ bool marParameters::load( std::ifstream& is )
                {
                        is.read( ( char* )&s, sizeof( int ) );
                        _stringValues[ i ].resize( s );
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        is.read( ( char* )_stringValues[ i ].c_str( ), s * sizeof( char ) );
+#else
+                       is.read( tmp , s * sizeof( char ) );
+                       _stringValues[ i ]=wxString(tmp);
+#endif
                } // rof
                return( true ); 
        }
@@ -422,7 +429,12 @@ wxArrayString marParameters::getRelationalArray( )
 
      for( i = 0; i < e_string_cont; i++, j += 2 ) {
                ret.Add( wxString( StringParamNames[ i ], wxConvUTF8)  );
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                ret.Add( wxString( _stringValues[ i ].c_str( ), wxConvUTF8 ) );
+#else
+               ret.Add( wxString( _stringValues[ i ] ) );
+#endif
      } // rof