Browse Source

fix linux build

Kolja Strohm 3 years ago
parent
commit
6961b2bec7
6 changed files with 27 additions and 10 deletions
  1. 2 0
      Array.h
  2. 6 6
      Datei.cpp
  3. 3 1
      Framework Linux.vcxproj
  4. 9 3
      Framework Linux.vcxproj.filters
  5. 1 0
      ToolTip.cpp
  6. 6 0
      ToolTip.h

+ 2 - 0
Array.h

@@ -65,7 +65,9 @@ namespace Framework
             *this = *next;
             return *next;
         }
+#ifdef WIN32
 #pragma warning( once : 26495 )
+#endif
     };
 
     template< class TYP >

+ 6 - 6
Datei.cpp

@@ -206,7 +206,7 @@ void Datei::lese( char *bytes, int len ) // lie
 
 Text *Datei::leseZeile() // ließt eine zeile
 {
-    if( !pfad | !stream )
+    if( !pfad || !stream )
         return 0;
     if( istEnde() )
         return 0;
@@ -405,7 +405,7 @@ int Datei::getUnterdateiAnzahl() const // gibt die Anzahl der unterdateien an
 #else
     if( !pfad )
         return 0;
-    if( !DateiIstVerzeichnis( pfad->getThis() ) )
+    if( !DateiIstVerzeichnis( dynamic_cast<Text *>( pfad->getThis() ) ) )
         return 0;
     int ret = 0;
     Text stxt = pfad->getText();
@@ -454,7 +454,7 @@ RCArray< Text > *Datei::getDateiListe() const // gibt eine Liste mit unterdateie
 #else
     if( !pfad )
         return 0;
-    if( !DateiIstVerzeichnis( pfad->getThis() ) )
+    if( !DateiIstVerzeichnis( dynamic_cast<Text *>( pfad->getThis() ) ) )
         return 0;
     Text stxt = pfad->getText();
     stxt.ersetzen( '\\', '/' );
@@ -664,7 +664,7 @@ bool Framework::DateiPfadErstellen( const char *pfad ) // Erstellt eine Datei in
                 t->release();
             continue;
         }
-        if( !DateiExistiert( t->getThis() ) )
+        if( !DateiExistiert( dynamic_cast<Text *>( t->getThis() ) ) )
             mkdir( t->getText(), 0777 );
         t->release();
         if( pf.positionVon( "\\", i ) == pf.getLength() - 1 )
@@ -718,13 +718,13 @@ bool Framework::DateiRemove( const char *pfad ) // L
     pfa.ersetzen( '\\', '/' );
     bool ret = 0;
     // pruefen ob Datei existiert
-    if( !DateiIstVerzeichnis( pfa.getThis() ) )
+    if( !DateiIstVerzeichnis( dynamic_cast<Text *>( pfa.getThis() ) ) )
         ret = std::remove( pfa.getText() ) == 0; // Datei loeschen
     else
     {
         ret = 1;
         Datei *dat = new Datei();
-        dat->setDatei( pfa.getThis() );
+        dat->setDatei( dynamic_cast<Text *>( pfa.getThis() ) );
         int anz = dat->getUnterdateiAnzahl();
         RCArray< Text > *liste = dat->getDateiListe();
         for( int i = 0; i < anz; ++i )

+ 3 - 1
Framework Linux.vcxproj

@@ -140,6 +140,7 @@
     <ClCompile Include="Punkt.cpp" />
     <ClCompile Include="Rahmen.cpp" />
     <ClCompile Include="Random.cpp" />
+    <ClCompile Include="ReferenceCounter.cpp" />
     <ClCompile Include="Schrift.cpp" />
     <ClCompile Include="Scroll.cpp" />
     <ClCompile Include="Tabelle.cpp" />
@@ -209,7 +210,7 @@
     <ClInclude Include="Random.h" />
     <ClInclude Include="Reader.h" />
     <ClInclude Include="Rect2.h" />
-    <ClInclude Include="ReferenceCounting.h" />
+    <ClInclude Include="ReferenceCounter.h" />
     <ClInclude Include="Schrift.h" />
     <ClInclude Include="Scroll.h" />
     <ClInclude Include="Tabelle.h" />
@@ -230,6 +231,7 @@
     <ClInclude Include="Vec3.h" />
     <ClInclude Include="Welt2D.h" />
     <ClInclude Include="Welt3D.h" />
+    <ClInclude Include="Writer.h" />
     <ClInclude Include="XML.h" />
     <ClInclude Include="Zeichnung.h" />
     <ClInclude Include="Zeichnung3D.h" />

+ 9 - 3
Framework Linux.vcxproj.filters

@@ -246,9 +246,6 @@
     <ClInclude Include="Textur2D.h">
       <Filter>Headerdateien\Framework\Grafik\2D</Filter>
     </ClInclude>
-    <ClInclude Include="ReferenceCounting.h">
-      <Filter>Headerdateien\Framework</Filter>
-    </ClInclude>
     <ClInclude Include="Welt2D.h">
       <Filter>Headerdateien\Framework\Grafik\2D</Filter>
     </ClInclude>
@@ -291,6 +288,12 @@
     <ClInclude Include="GraphicsApi.h">
       <Filter>Headerdateien\Framework\Grafik\DX</Filter>
     </ClInclude>
+    <ClInclude Include="ReferenceCounter.h">
+      <Filter>Headerdateien\Framework</Filter>
+    </ClInclude>
+    <ClInclude Include="Writer.h">
+      <Filter>Headerdateien\Framework</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="Prozess.cpp">
@@ -461,5 +464,8 @@
     <ClCompile Include="GraphicsApi.cpp">
       <Filter>Quelldateien\Framework\Grafik\DX</Filter>
     </ClCompile>
+    <ClCompile Include="ReferenceCounter.cpp">
+      <Filter>Quelldateien\Framework</Filter>
+    </ClCompile>
   </ItemGroup>
 </Project>

+ 1 - 0
ToolTip.cpp

@@ -24,6 +24,7 @@ ToolTip::ToolTip( Bildschirm *zScreen )
     alpha( 0 ),
     sichtbar( 0 ),
     zeichnen( 0 ),
+    mausIn2( 0 ),
     bildschirm( zScreen ),
     onShow( 0 ),
     onHide( 0 )

+ 6 - 0
ToolTip.h

@@ -15,6 +15,9 @@ namespace Framework
     struct MausEreignis; //! MausEreignis.h
     class Bildschirm; //! Bildschirm.h
 
+#ifdef WIN32
+#pragma vtordisp(push, 2)
+#endif
     class ToolTip : public ZeichnungHintergrund
     {
     private:
@@ -89,6 +92,9 @@ namespace Framework
         //! Erzeugt eine komplette kopie eines tooltips
         DLLEXPORT Zeichnung *dublizieren() const override;
     };
+#ifdef WIN32
+#pragma vtordisp(pop)
+#endif
 }
 
 #endif