]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Finalize windows porting rnv/windows_9.1.0
authorrnv <rnv@opencascade.com>
Fri, 7 Sep 2018 08:40:44 +0000 (11:40 +0300)
committerrnv <rnv@opencascade.com>
Fri, 7 Sep 2018 08:40:44 +0000 (11:40 +0300)
src/GEOM_I/GEOM_Gen_i.cc

index 715328ce0629535d623fe78c85ab9dda4e524342..4322605fae588a9ce9a9e95398f81e429e25fc79 100644 (file)
@@ -2510,21 +2510,21 @@ void GEOM_Gen_i::LoadPlugin(const std::string& theLibName)
 
   // check, if corresponding operations are already created
   if (myOpCreatorMap.find(theLibName) == myOpCreatorMap.end()) {
-#ifdef UNICODE
-         //RNV: this is workaround for providing compilation,
-         //     path should be processed as unicode string.
-         size_t length = strlen(aPlatformLibName.c_str()) + sizeof(char);
-         wchar_t* aPath = new wchar_t[length + 1];
-         memset(aPath, '\0', length);
-         mbstowcs(aPath, aPlatformLibName.c_str(), length);
-#else
-         const char* aPath = xmlPath.c_str();
-#endif
-    // load plugin library
 #if WIN32
+  #if UNICODE
+    //RNV: this is workaround for providing compilation,
+    //     path should be processed as unicode string.
+    size_t length = strlen(aPlatformLibName.c_str()) + sizeof(char);
+    wchar_t* aPath = new wchar_t[length + 1];
+    memset(aPath, '\0', length);
+    mbstowcs(aPath, aPlatformLibName.c_str(), length);
+  #else
+    const char* aPath = aPlatformLibName.c_str();
+  #endif
+    // load plugin library
     LibHandle libHandle = LoadLib(aPath);
 #else
-       LibHandle libHandle = LoadLib(aPlatformLibName.c_str());
+    LibHandle libHandle = LoadLib(aPlatformLibName.c_str());
 #endif
     if (!libHandle) {
       // report any error, if occurred