瀏覽代碼

fix array iteration

Kolja Strohm 2 年之前
父節點
當前提交
f45c65c8d6

+ 31 - 32
ksgScript/Editor/Editor.cpp

@@ -48,20 +48,20 @@ Editor::~Editor()
 
 // Verarbeitet ein Maus Ereignis. Wird vom Framework automatisch aufgerufen.
 //  me: Das Ereignis
-void Editor::doMausEreignis( MausEreignis &me, bool userRet )
+void Editor::doMausEreignis( MausEreignis& me, bool userRet )
 {
     if( hatStyleNicht( Style::Erlaubt ) || !userRet )
     {
         int rbr = 0;
         if( rahmen )
             rbr = rahmen->getRBreite();
-        if( ( ( vertikalScrollBar && hatStyle( Style::VScroll ) ) ||
-              ( horizontalScrollBar && hatStyle( Style::HScroll ) ) ) &&
+        if( ((vertikalScrollBar && hatStyle( Style::VScroll )) ||
+              (horizontalScrollBar && hatStyle( Style::HScroll ))) &&
             me.mx > rbr && me.mx < gr.x - rbr &&
             me.my > rbr && me.my < gr.y - rbr )
         {
             me.verarbeitet |= vertikalScrollBar->doMausMessage( gr.x - rbr - 15, rbr, 15, gr.y - rbr * 2, me );
-            me.verarbeitet |= horizontalScrollBar->doMausMessage( rbr, gr.y - rbr * 2 - 15, gr.x - rbr * 2 - ( ( vertikalScrollBar && hatStyle( Style::VScroll ) ) ? 15 : 0 ), 15, me );
+            me.verarbeitet |= horizontalScrollBar->doMausMessage( rbr, gr.y - rbr * 2 - 15, gr.x - rbr * 2 - ((vertikalScrollBar && hatStyle( Style::VScroll )) ? 15 : 0), 15, me );
         }
         mausKlick = 0;
         return;
@@ -83,7 +83,7 @@ void Editor::doMausEreignis( MausEreignis &me, bool userRet )
         }
         if( horizontalScrollBar && hatStyle( Style::HScroll ) )
         {
-            if( horizontalScrollBar->doMausMessage( rbr, gr.y - rbr - 15, gr.x - rbr * 2 - ( ( vertikalScrollBar && hatStyle( Style::VScroll ) ) ? 15 : 0 ), 15, me ) )
+            if( horizontalScrollBar->doMausMessage( rbr, gr.y - rbr - 15, gr.x - rbr * 2 - ((vertikalScrollBar && hatStyle( Style::VScroll )) ? 15 : 0), 15, me ) )
             {
                 me.verarbeitet = 1;
                 return;
@@ -97,8 +97,8 @@ void Editor::doMausEreignis( MausEreignis &me, bool userRet )
                 bool shift = getTastenStand( T_Shift );
                 if( me.id == Framework::ME_PLinks )
                 {
-                    int scrollHi = ( vertikalScrollBar && hatStyle( Style::VScroll ) ) ? vertikalScrollBar->getScroll() : 0;
-                    int scrollBr = ( horizontalScrollBar && hatStyle( Style::HScroll ) ) ? horizontalScrollBar->getScroll() : 0;
+                    int scrollHi = (vertikalScrollBar && hatStyle( Style::VScroll )) ? vertikalScrollBar->getScroll() : 0;
+                    int scrollBr = (horizontalScrollBar && hatStyle( Style::HScroll )) ? horizontalScrollBar->getScroll() : 0;
                     int xxx = me.mx - rbr + scrollBr;
                     int yyy = me.my - rbr + scrollHi;
                     int pos = textRd->textPos( script->getText(), xxx, yyy );
@@ -121,8 +121,8 @@ void Editor::doMausEreignis( MausEreignis &me, bool userRet )
                 }
                 if( me.id == ME_Bewegung && mausKlick )
                 {
-                    int scrollHi = ( vertikalScrollBar && hatStyle( Style::VScroll ) ) ? vertikalScrollBar->getScroll() : 0;
-                    int scrollBr = ( horizontalScrollBar && hatStyle( Style::HScroll ) ) ? horizontalScrollBar->getScroll() : 0;
+                    int scrollHi = (vertikalScrollBar && hatStyle( Style::VScroll )) ? vertikalScrollBar->getScroll() : 0;
+                    int scrollBr = (horizontalScrollBar && hatStyle( Style::HScroll )) ? horizontalScrollBar->getScroll() : 0;
                     int xxx = me.mx - rbr + scrollBr;
                     int yyy = me.my - rbr + scrollHi;
                     int pos = textRd->textPos( script->getText(), xxx, yyy );
@@ -141,8 +141,8 @@ void Editor::doMausEreignis( MausEreignis &me, bool userRet )
                 {
                     if( !shift )
                     {
-                        int scrollHi = ( vertikalScrollBar && hatStyle( Style::VScroll ) ) ? vertikalScrollBar->getScroll() : 0;
-                        int scrollBr = ( horizontalScrollBar && hatStyle( Style::HScroll ) ) ? horizontalScrollBar->getScroll() : 0;
+                        int scrollHi = (vertikalScrollBar && hatStyle( Style::VScroll )) ? vertikalScrollBar->getScroll() : 0;
+                        int scrollBr = (horizontalScrollBar && hatStyle( Style::HScroll )) ? horizontalScrollBar->getScroll() : 0;
                         int xxx = me.mx - rbr + scrollBr;
                         int yyy = me.my - rbr + scrollHi;
                         int pos = textRd->textPos( script->getText(), xxx, yyy );
@@ -181,13 +181,13 @@ void Editor::updateHScroll( int pos )
         if( hatStyle( Style::Erlaubt ) && maxBr > br && pos > 0 && pos < script->getLength() )
         {
             int p1 = 0;
-            char *tmp = script->getText();
+            char* tmp = script->getText();
             for( int i = 0; i < pos; i++, tmp++ )
             {
                 if( *tmp == '\n' )
                     p1 = i + 1;
             }
-            Text *t = script->getTeilText( p1, pos );
+            Text* t = script->getTeilText( p1, pos );
             int cbr = textRd->getTextBreite( t->getText() );
             t->release();
             if( cbr + 12 > horizontalScrollBar->getScroll() + horizontalScrollBar->getScrollData()->anzeige )
@@ -218,7 +218,7 @@ void Editor::updateVScroll( int pos )
             Text t;
             int zh = textRd->getTextHeight( t ) + textRd->getZeilenabstand();
             int l = script->getLength();
-            for( int i = 0; i < l && ( i < pos || hatStyleNicht( Style::Erlaubt ) ); ++i )
+            for( int i = 0; i < l && (i < pos || hatStyleNicht( Style::Erlaubt )); ++i )
             {
                 if( script->getText()[ i ] == '\n' )
                     sPos += zh;
@@ -229,7 +229,7 @@ void Editor::updateVScroll( int pos )
             if( sPos - textRd->getZeilenabstand() - textRd->getTextHeight( Text( "a" ) ) < vertikalScrollBar->getScroll() )
                 vertikalScrollBar->scroll( sPos - textRd->getZeilenabstand() - textRd->getTextHeight( Text( "a" ) ) );
             if( sPos + textRd->getZeilenabstand() + textRd->getTextHeight( Text( "a" ) ) > vertikalScrollBar->getScroll() + vertikalScrollBar->getScrollData()->anzeige )
-                vertikalScrollBar->scroll( sPos + ( textRd->getZeilenabstand() + textRd->getTextHeight( Text( "a" ) ) ) * 2 - hi );
+                vertikalScrollBar->scroll( sPos + (textRd->getZeilenabstand() + textRd->getTextHeight( Text( "a" ) )) * 2 - hi );
         }
         rend = 1;
     }
@@ -237,7 +237,7 @@ void Editor::updateVScroll( int pos )
 
 // Setzt die zu verwendende Schrift
 //  s: Die Schrift
-void Editor::setSchriftZ( Schrift *s )
+void Editor::setSchriftZ( Schrift* s )
 {
     if( !textRd )
         textRd = new TextRenderer( s );
@@ -247,7 +247,7 @@ void Editor::setSchriftZ( Schrift *s )
 
 // Setzt den zu verwendenden Text Renderer
 //  t: Der Text Renderer
-void Editor::setTextRendererZ( TextRenderer *t )
+void Editor::setTextRendererZ( TextRenderer* t )
 {
     if( textRd )
         textRd->release();
@@ -256,7 +256,7 @@ void Editor::setTextRendererZ( TextRenderer *t )
 
 // Setzt den Text (das Script was verändert werden soll)
 //  txt: Der Text
-void Editor::setText( Text *txt )
+void Editor::setText( Text* txt )
 {
     lockZeichnung();
     if( script )
@@ -272,7 +272,7 @@ void Editor::setText( Text *txt )
 }
 
 // Gibt den aktuellen Text zurück
-Text *Editor::zText() const
+Text* Editor::zText() const
 {
     return script;
 }
@@ -305,7 +305,7 @@ bool Editor::getWarningDetection() const
 
 // Verarbeitet ein Tastatur Ereignis. Wird vom Framework automatisch aufgerufen
 //  te: Das Ereignis
-void Editor::doTastaturEreignis( TastaturEreignis &te )
+void Editor::doTastaturEreignis( TastaturEreignis& te )
 {
     bool ntakc = !te.verarbeitet;
     if( te.verarbeitet || hatStyleNicht( Style::Fokus ) )
@@ -431,7 +431,7 @@ void Editor::doTastaturEreignis( TastaturEreignis &te )
                             int len = begF - cPos;
                             if( len < 0 )
                                 len = -len;
-                            char *txt = new char[ len + 1 ];
+                            char* txt = new char[ len + 1 ];
                             txt[ len ] = 0;
                             int beg = begF < cPos ? begF : cPos;
                             for( int i = beg; i < beg + len; ++i )
@@ -450,7 +450,7 @@ void Editor::doTastaturEreignis( TastaturEreignis &te )
                             if( cPos > begF )
                                 cPos = begF;
                         }
-                        char *txt = TextInsert();
+                        char* txt = TextInsert();
                         script->insert( cPos, txt );
                         cPos += textLength( txt );
                         begF = cPos;
@@ -494,7 +494,7 @@ void Editor::doTastaturEreignis( TastaturEreignis &te )
         zm.messungStart();
         parser->reload();
         zm.messungEnde();
-        reloadCounter = (int)( zm.getSekunden() * 100 );
+        reloadCounter = (int)(zm.getSekunden() * 100);
     }
     unlockZeichnung();
     if( ntakc && te.verarbeitet && nTak )
@@ -517,12 +517,12 @@ bool Editor::tick( double tickval )
         if( tickVal >= 1 )
         {
             lockZeichnung();
-            if( ( reloadCounter -= 2 ) <= 0 )
+            if( (reloadCounter -= 2) <= 0 )
             {
                 zm.messungStart();
                 parser->reload();
                 zm.messungEnde();
-                reloadCounter = (int)( zm.getSekunden() * 100 );
+                reloadCounter = (int)(zm.getSekunden() * 100);
             }
             unlockZeichnung();
             tickVal -= 1;
@@ -532,7 +532,7 @@ bool Editor::tick( double tickval )
 }
 
 // Zeichnet den Editor nach rObj
-void Editor::render( Bild &rObj )
+void Editor::render( Bild& rObj )
 {
     if( hatStyleNicht( Style::Sichtbar ) )
         return;
@@ -555,12 +555,11 @@ void Editor::render( Bild &rObj )
     if( hs )
         xxx -= horizontalScrollBar->getScroll();
     parser->reset();
-    auto colorF = [this, &rObj]( int x, int y, int pos ) -> int
-    {
+    auto colorF = [this, &rObj]( int x, int y, int pos ) -> int {
         if( !parser )
-            return colors[ KSGScriptEditor::ColorType::NORMAL_TEXT ];
+            return colors[ (int)KSGScriptEditor::ColorType::NORMAL_TEXT ];
         int uC = -1;
-        int tC = colors[ parser->getNextColor( pos, uC ) ];
+        int tC = colors[ (int)parser->getNextColor( pos, uC ) ];
         if( uC >= 0 )
             rObj.drawLinieH( x, y + 12, 12, colors[ uC ] );
         return tC;
@@ -589,6 +588,6 @@ void Editor::render( Bild &rObj )
 //  cType: Der Codetyp, der die Farbe bekommen soll
 void Editor::setTextColor( int color, ColorType cType )
 {
-    if( cType >= 0 && cType < ColorType::COLOR_ANZAHL )
-        colors[ cType ] = color;
+    if( (int)cType >= 0 && cType < ColorType::COLOR_ANZAHL )
+        colors[ (int)cType ] = color;
 }

+ 11 - 11
ksgScript/Editor/Editor.h

@@ -17,9 +17,9 @@ namespace KSGScript
     class Editor : public KSGScriptEditor
     {
     private:
-        TextRenderer *textRd;
-        Text *script;
-        ColorParser *parser;
+        TextRenderer* textRd;
+        Text* script;
+        ColorParser* parser;
         ZeitMesser zm;
         bool errorDetection;
         bool warningDetection;
@@ -27,14 +27,14 @@ namespace KSGScript
         int reloadCounter;
         int cPos;
         int begF;
-        int colors[ COLOR_ANZAHL ];
+        int colors[ (int)ColorType::COLOR_ANZAHL ];
         bool mausKlick;
 
         void updateHScroll( int pos );
         void updateVScroll( int pos );
         // Verarbeitet ein Maus Ereignis. Wird vom Framework automatisch aufgerufen.
         //  me: Das Ereignis
-        void doMausEreignis( MausEreignis &me, bool userRet ) override;
+        void doMausEreignis( MausEreignis& me, bool userRet ) override;
 
     public:
         // Konstructor
@@ -43,15 +43,15 @@ namespace KSGScript
         ~Editor();
         // Setzt die zu verwendende Schrift
         //  s: Die Schrift
-        void setSchriftZ( Schrift *s ) override;
+        void setSchriftZ( Schrift* s ) override;
         // Setzt den zu verwendenden Text Renderer
         //  t: Der Text Renderer
-        void setTextRendererZ( TextRenderer *t ) override;
+        void setTextRendererZ( TextRenderer* t ) override;
         // Setzt den Text (das Script was verändert werden soll)
         //  txt: Der Text
-        void setText( Framework::Text *txt ) override;
+        void setText( Framework::Text* txt ) override;
         // Gibt den aktuellen Text zurück
-        Text *zText() const override;
+        Text* zText() const override;
         // Schaltet die Fehlererkennung ein oder aus
         //  on: 1, um die Fehlererkennung einzuschalten, 0 um sie auszuschalten
         void setErrorDetection( bool on = 1 ) override;
@@ -64,13 +64,13 @@ namespace KSGScript
         bool getWarningDetection() const override;
         // Verarbeitet ein Tastatur Ereignis. Wird vom Framework automatisch aufgerufen
         //  te: Das Ereignis
-        void doTastaturEreignis( TastaturEreignis &te ) override;
+        void doTastaturEreignis( TastaturEreignis& te ) override;
         // Updated den Editor
         //  tickVal: Die vergangene Zeit in Sekunden, die seit dem Letzten Aufruf dieser Funktion verstrichen ist
         //  return: 1, wenn das Bild neu gezeichnet werden muss. 0 sonnst
         bool tick( double tickVal ) override;
         // Zeichnet den Editor nach rObj
-        void render( Bild &rObj ) override;
+        void render( Bild& rObj ) override;
         // Setzt die Farbe eines Bestimmten Codetyps
         //  color: Die Farbe in 0xAARRGGBB Format
         //  cType: Der Codetyp, der die Farbe bekommen soll

+ 53 - 53
ksgScript/Editor/Parser/ColorParser.cpp

@@ -2,17 +2,17 @@
 
 using namespace KSGScript;
 
-const char *( ColorParser::keyword[] ) = { "lesen", "var", "func", "Rückruf", "class", "public", "private", "if", "else", "return", "break", "continue", "for", "while" };
+const char* (ColorParser::keyword[]) = { "lesen", "var", "func", "Rückruf", "class", "public", "private", "if", "else", "return", "break", "continue", "for", "while" };
 const int ColorParser::keywordAnz = 14;
-const char *( ColorParser::type[] ) = { "void", "bool", "int", "double", "Array", "Thread", "Text", "Bild", "MausEreignis", "TastaturEreignis", "TextFeld", "Knopf", "Fenster", "BildZ", "Animation2DData", "Animation2D" };
+const char* (ColorParser::type[]) = { "void", "bool", "int", "double", "Array", "Thread", "Text", "Bild", "MausEreignis", "TastaturEreignis", "TextFeld", "Knopf", "Fenster", "BildZ", "Animation2DData", "Animation2D" };
 const int ColorParser::typeAnz = 16;
 
 // Konstructor
 //  zTxt: Der Text, der geparsed werden soll
-ColorParser::ColorParser( Text *zTxt )
+ColorParser::ColorParser( Text* zTxt )
     : KSGSLeser()
 {
-    txt = dynamic_cast<Text *>( zTxt->getThis() );
+    txt = dynamic_cast<Text*>(zTxt->getThis());
     reset();
     reload();
 }
@@ -20,12 +20,12 @@ ColorParser::ColorParser( Text *zTxt )
 // Destructor
 ColorParser::~ColorParser()
 {
-    for( auto i = abschnitt.getIterator(); i; i++ )
+    for( auto i : abschnitt )
     {
-        if( i._.zFunktion )
-            i._.zFunktion->release();
-        if( i._.zKlasse )
-            i._.zKlasse->release();
+        if( i.zFunktion )
+            i.zFunktion->release();
+        if( i.zKlasse )
+            i.zKlasse->release();
     }
     txt->release();
 }
@@ -72,17 +72,17 @@ void ColorParser::reload()
     error.leeren();
     string.leeren();
     kommentar.leeren();
-    for( auto i = abschnitt.getIterator(); i; i++ )
+    for( auto i : abschnitt )
     {
-        if( i._.zFunktion )
-            i._.zFunktion->release();
-        if( i._.zKlasse )
-            i._.zKlasse->release();
+        if( i.zFunktion )
+            i.zFunktion->release();
+        if( i.zKlasse )
+            i.zKlasse->release();
     }
     abschnitt.leeren();
     delete dat;
     dat = new KSGSLeseScript();
-    d = new TextReader( dynamic_cast<Text *>( txt->getThis() ) );
+    d = new TextReader( dynamic_cast<Text*>(txt->getThis()) );
     zeile = 1;
     while( !d->istEnde() )
     {
@@ -95,7 +95,7 @@ void ColorParser::reload()
         case 1: // Klasse
             if( 1 )
             {
-                KSGSLeseKlasse *k = leseKlasse();
+                KSGSLeseKlasse* k = leseKlasse();
                 if( !k )
                 {
                     //error( 6, { "Klasse", *pfad }, zObj );
@@ -108,7 +108,7 @@ void ColorParser::reload()
         case 2: // funktion
             if( 1 )
             {
-                KSGSLeseFunktion *f = leseFunktion();
+                KSGSLeseFunktion* f = leseFunktion();
                 if( !f )
                 {
                     //error( 6, { "Funktion", *pfad }, zObj );
@@ -121,7 +121,7 @@ void ColorParser::reload()
         case 3: // Variable
             if( 1 )
             {
-                KSGSLeseVariable *v = leseVariable();
+                KSGSLeseVariable* v = leseVariable();
                 if( !v )
                 {
                     //error( 6, { "Variable", *pfad }, zObj );
@@ -155,10 +155,10 @@ void ColorParser::reload()
                     br = 1;
                     break;
                 }
-                char *datei = new char[ (int)( end - d->getLPosition() ) + 1 ];
+                char* datei = new char[ (int)(end - d->getLPosition()) + 1 ];
                 datei[ end - d->getLPosition() ] = 0;
-                d->lese( datei, (int)( end - d->getLPosition() ) );
-                Text *dPf = new Text( datei );
+                d->lese( datei, (int)(end - d->getLPosition()) );
+                Text* dPf = new Text( datei );
                 dPf->ersetzen( '\\', '/' );
                 if( dPf->getText()[ 0 ] == '/' )
                     dPf->remove( 0 );
@@ -172,9 +172,9 @@ void ColorParser::reload()
                     break;
                 }
                 d->setLPosition( d->getLPosition() + 1, 0 );
-                Text *pf = new Text( fileName );
+                Text* pf = new Text( fileName );
                 fileName.setText( dPf );
-                Reader *tmp = d;
+                Reader* tmp = d;
                 if( !ladeDatei() )
                 {
                     handleError( (int)d->getLPosition() - 1, (int)d->getLPosition() );
@@ -202,14 +202,14 @@ void ColorParser::reload()
             break;
         }
     }
-    d = (Reader *)( (TextReader *)d )->release();
+    d = (Reader*)((TextReader*)d)->release();
 }
 
-KSGSLeseKlasse *ColorParser::leseKlasse()
+KSGSLeseKlasse* ColorParser::leseKlasse()
 {
     Abschnitt abs;
     abs.anfang = (int)d->getLPosition();
-    KSGSLeseKlasse *ret = KSGSLeser::leseKlasse();
+    KSGSLeseKlasse* ret = KSGSLeser::leseKlasse();
     abs.ende = (int)d->getLPosition();
     abs.zKlasse = ret;
     abs.zFunktion = 0;
@@ -219,11 +219,11 @@ KSGSLeseKlasse *ColorParser::leseKlasse()
     return ret;
 }
 
-KSGSLeseFunktion *ColorParser::leseFunktion()
+KSGSLeseFunktion* ColorParser::leseFunktion()
 {
     Abschnitt abs;
     abs.anfang = (int)d->getLPosition();
-    KSGSLeseFunktion *ret = KSGSLeser::leseFunktion();
+    KSGSLeseFunktion* ret = KSGSLeser::leseFunktion();
     abs.ende = (int)d->getLPosition();
     abs.zKlasse = 0;
     abs.zFunktion = ret;
@@ -234,7 +234,7 @@ KSGSLeseFunktion *ColorParser::leseFunktion()
 }
 
 // Gibt den Farbtyp des nächsten Zeichens zurück
-KSGScriptEditor::ColorType ColorParser::getNextColor( int p, int &underlineC )
+KSGScriptEditor::ColorType ColorParser::getNextColor( int p, int& underlineC )
 {
     KSGScriptEditor::ColorType color = KSGScriptEditor::ColorType::NORMAL_TEXT;
     int scriptL = txt->getLength();
@@ -248,14 +248,14 @@ KSGScriptEditor::ColorType ColorParser::getNextColor( int p, int &underlineC )
     }
     bool inString = 0;
     bool inKommentar = 0;
-    for( auto i = string.getIterator(); i; i++ )
+    for( auto i : string )
     {
-        if( i._.anfang <= p && i._.ende >= p )
+        if( i.anfang <= p && i.ende >= p )
             inString = 1;
     }
-    for( auto i = kommentar.getIterator(); i; i++ )
+    for( auto i : kommentar )
     {
-        if( i._.anfang <= p && i._.ende >= p )
+        if( i.anfang <= p && i.ende >= p )
             inKommentar = 1;
     }
     if( !inString && !inKommentar )
@@ -268,7 +268,7 @@ KSGScriptEditor::ColorType ColorParser::getNextColor( int p, int &underlineC )
                 pos.inKeyword = 1;
                 for( int j = 0; j < kl && j + p < scriptL && pos.inKeyword; j++ )
                     pos.inKeyword &= txt->getText()[ j + p ] == keyword[ i ][ j ];
-                if( pos.inKeyword && ( kl + p == scriptL || istTrenner( txt->getText()[ kl + p ] ) ) )
+                if( pos.inKeyword && (kl + p == scriptL || istTrenner( txt->getText()[ kl + p ] )) )
                     break;
                 pos.inKeyword = 0;
             }
@@ -281,7 +281,7 @@ KSGScriptEditor::ColorType ColorParser::getNextColor( int p, int &underlineC )
                 pos.inTypename = 1;
                 for( int j = 0; j < tl && j + p < scriptL && pos.inTypename; j++ )
                     pos.inTypename &= txt->getText()[ j + p ] == type[ i ][ j ];
-                if( pos.inTypename && ( tl + p == scriptL || istTrenner( txt->getText()[ tl + p ] ) ) )
+                if( pos.inTypename && (tl + p == scriptL || istTrenner( txt->getText()[ tl + p ] )) )
                     break;
                 pos.inTypename = 0;
             }
@@ -294,7 +294,7 @@ KSGScriptEditor::ColorType ColorParser::getNextColor( int p, int &underlineC )
                     pos.inTypename = 1;
                     for( int j = 0; j < tl && j + p < scriptL && pos.inTypename; j++ )
                         pos.inTypename &= txt->getText()[ j + p ] == dat->klassen.get( i )->name.getText()[ j ];
-                    if( pos.inTypename && ( tl + p == scriptL || istTrenner( txt->getText()[ tl + p ] ) ) )
+                    if( pos.inTypename && (tl + p == scriptL || istTrenner( txt->getText()[ tl + p ] )) )
                         break;
                     pos.inTypename = 0;
                 }
@@ -302,20 +302,20 @@ KSGScriptEditor::ColorType ColorParser::getNextColor( int p, int &underlineC )
         }
         if( !pos.inInstanzVar && !pos.inParameter && !pos.inKeyword && !pos.inTypename && istLehr( cm1 ) )
         {
-            for( auto i = abschnitt.getIterator(); i; i++ )
+            for( const Abschnitt& i : abschnitt )
             {
-                if( i._.anfang <= p && i._.ende >= p )
+                if( i.anfang <= p && i.ende >= p )
                 {
-                    if( i._.zFunktion )
+                    if( i.zFunktion )
                     {
-                        int anz = i._.zFunktion->parameter.getEintragAnzahl();
+                        int anz = i.zFunktion->parameter.getEintragAnzahl();
                         for( int j = 0; j < anz; j++ )
                         {
-                            int nl = i._.zFunktion->parameter.get( j )->name.getLength();
+                            int nl = i.zFunktion->parameter.get( j )->name.getLength();
                             pos.inParameter = 1;
                             for( int k = 0; k < nl && k + p < scriptL && pos.inParameter; k++ )
-                                pos.inParameter &= txt->getText()[ k + p ] == i._.zFunktion->parameter.get( j )->name.getText()[ k ];
-                            if( pos.inParameter && ( nl + p == scriptL || istTrenner( txt->getText()[ nl + p ] ) ) )
+                                pos.inParameter &= txt->getText()[ k + p ] == i.zFunktion->parameter.get( j )->name.getText()[ k ];
+                            if( pos.inParameter && (nl + p == scriptL || istTrenner( txt->getText()[ nl + p ] )) )
                                 break;
                             pos.inParameter = 0;
                         }
@@ -325,20 +325,20 @@ KSGScriptEditor::ColorType ColorParser::getNextColor( int p, int &underlineC )
         }
         if( !pos.inInstanzVar && !pos.inParameter && !pos.inKeyword && !pos.inTypename && istLehr( cm1 ) )
         {
-            for( auto i = abschnitt.getIterator(); i; i++ )
+            for( const Abschnitt& i : abschnitt )
             {
-                if( i._.anfang <= p && i._.ende >= p )
+                if( i.anfang <= p && i.ende >= p )
                 {
-                    if( i._.zKlasse )
+                    if( i.zKlasse )
                     {
-                        int anz = i._.zKlasse->variablen.getEintragAnzahl();
+                        int anz = i.zKlasse->variablen.getEintragAnzahl();
                         for( int j = 0; j < anz; j++ )
                         {
-                            int nl = i._.zKlasse->variablen.get( j )->name.getLength();
+                            int nl = i.zKlasse->variablen.get( j )->name.getLength();
                             pos.inInstanzVar = 1;
                             for( int k = 0; k < nl && k + p < scriptL && pos.inInstanzVar; k++ )
-                                pos.inInstanzVar &= txt->getText()[ k + p ] == i._.zKlasse->variablen.get( j )->name.getText()[ k ];
-                            if( pos.inInstanzVar && ( nl + p == scriptL || istTrenner( txt->getText()[ nl + p ] ) ) )
+                                pos.inInstanzVar &= txt->getText()[ k + p ] == i.zKlasse->variablen.get( j )->name.getText()[ k ];
+                            if( pos.inInstanzVar && (nl + p == scriptL || istTrenner( txt->getText()[ nl + p ] )) )
                                 break;
                             pos.inInstanzVar = 0;
                         }
@@ -359,10 +359,10 @@ KSGScriptEditor::ColorType ColorParser::getNextColor( int p, int &underlineC )
         color = KSGScriptEditor::ColorType::STRING;
     if( inKommentar )
         color = KSGScriptEditor::ColorType::KOMMENTAR;
-    for( auto i = error.getIterator(); i; i++ )
+    for( auto i : error )
     {
-        if( i._.anfang <= p && i._.ende >= p )
-            underlineC = KSGScriptEditor::ColorType::ERROR_UNDERLINE;
+        if( i.anfang <= p && i.ende >= p )
+            underlineC = (int)KSGScriptEditor::ColorType::ERROR_UNDERLINE;
     }
     return color;
 }

+ 52 - 52
ksgScript/Include/KSGScript.h

@@ -41,46 +41,46 @@ namespace KSGScript
     {
     public:
         // nicht constant
-        virtual KSGSVariable *startFunktion( int id, bool zugriff, Framework::RCArray< KSGSVariable > *parameter ) = 0;
-        virtual KSGSVariable *doOperator( int id, KSGSVariable *rechts ) = 0;
-        virtual void setVariable( int id, KSGSVariable *var ) = 0;
+        virtual KSGSVariable* startFunktion( int id, bool zugriff, Framework::RCArray< KSGSVariable >* parameter ) = 0;
+        virtual KSGSVariable* doOperator( int id, KSGSVariable* rechts ) = 0;
+        virtual void setVariable( int id, KSGSVariable* var ) = 0;
         // constant
-        virtual KSGSVariable *getVariable( int id, bool zugriff ) const = 0;
-        virtual KSGSVariable *umwandelnIn( int typ ) const = 0;
+        virtual KSGSVariable* getVariable( int id, bool zugriff ) const = 0;
+        virtual KSGSVariable* umwandelnIn( int typ ) const = 0;
         virtual int getTyp() const = 0;
         // verarbeiten
         virtual bool getBool() const = 0;
         virtual int getInt() const = 0;
         virtual double getDouble() const = 0;
-        virtual Framework::Text *getText() const = 0;
-        virtual Framework::Bild *getBild() const = 0;
+        virtual Framework::Text* getText() const = 0;
+        virtual Framework::Bild* getBild() const = 0;
         virtual Framework::MausEreignis getMausEreignis() const = 0;
         virtual Framework::TastaturEreignis getTastaturEreignis() const = 0;
-        virtual Framework::TextFeld *getTextFeld() const = 0;
-        virtual Framework::Knopf *getKnopf() const = 0;
-        virtual Framework::Fenster *getFenster() const = 0;
-        virtual Framework::BildZ *getBildZ() const = 0;
-        virtual Framework::Animation2DData *getAnimation2DData() const = 0;
-        virtual Framework::Animation2D *getAnimation2D() const = 0;
-        virtual Framework::Zeichnung *getZeichnung() const = 0;
-        virtual Framework::RCArray< KSGSVariable > *getArray() const = 0;
+        virtual Framework::TextFeld* getTextFeld() const = 0;
+        virtual Framework::Knopf* getKnopf() const = 0;
+        virtual Framework::Fenster* getFenster() const = 0;
+        virtual Framework::BildZ* getBildZ() const = 0;
+        virtual Framework::Animation2DData* getAnimation2DData() const = 0;
+        virtual Framework::Animation2D* getAnimation2D() const = 0;
+        virtual Framework::Zeichnung* getZeichnung() const = 0;
+        virtual Framework::RCArray< KSGSVariable >* getArray() const = 0;
     };
 
     class KSGScriptProcessor : public virtual Framework::ReferenceCounter
     {
     public:
-        virtual void logNachricht( char *n ) = 0;
-        virtual Framework::Text *convertPfad( char *pf ) = 0;
-        virtual void setVariable( int id, KSGSVariable *var ) = 0;
-        virtual KSGSVariable *startFunktion( int id, Framework::RCArray< KSGSVariable > *parameter ) = 0;
-        virtual KSGSVariable *erstellKlassenInstanz( int id ) = 0;
-        virtual KSGSVariable *getVariable( int id ) const = 0;
+        virtual void logNachricht( char* n ) = 0;
+        virtual Framework::Text* convertPfad( char* pf ) = 0;
+        virtual void setVariable( int id, KSGSVariable* var ) = 0;
+        virtual KSGSVariable* startFunktion( int id, Framework::RCArray< KSGSVariable >* parameter ) = 0;
+        virtual KSGSVariable* erstellKlassenInstanz( int id ) = 0;
+        virtual KSGSVariable* getVariable( int id ) const = 0;
         virtual int getScriptId() const = 0;
-        virtual Framework::Bildschirm *zBildschirm() const = 0;
-        virtual Framework::Schrift *zSchrift() const = 0;
-        virtual int getFunktionId( const char *name ) const = 0;
+        virtual Framework::Bildschirm* zBildschirm() const = 0;
+        virtual Framework::Schrift* zSchrift() const = 0;
+        virtual int getFunktionId( const char* name ) const = 0;
         virtual bool istBeendet( int scrId ) const = 0;
-        virtual KSGSVariable *callback( Framework::RCArray< KSGSVariable > *parameter ) const = 0;
+        virtual KSGSVariable* callback( Framework::RCArray< KSGSVariable >* parameter ) const = 0;
     };
 
     /*
@@ -90,10 +90,10 @@ namespace KSGScript
     class KSGSExpressionEvaluator : public KSGScriptProcessor
     {
     public:
-        virtual KSGSVariable *createParameter( Framework::Text name, int type ) = 0;
-        virtual KSGSVariable *getParameter( Framework::Text name ) = 0;
+        virtual KSGSVariable* createParameter( Framework::Text name, int type ) = 0;
+        virtual KSGSVariable* getParameter( Framework::Text name ) = 0;
         virtual void setExpression( Framework::Text expression ) = 0;
-        virtual KSGSVariable *evaluate() = 0;
+        virtual KSGSVariable* evaluate() = 0;
     };
 
     /*
@@ -107,31 +107,31 @@ namespace KSGScript
         // nicht constant
         virtual void lock() = 0;
         virtual void unlock() = 0;
-        virtual void setScriptDatei( const char *pfad ) = 0;
-        virtual void setScriptDatei( Framework::Text *pfad ) = 0;
+        virtual void setScriptDatei( const char* pfad ) = 0;
+        virtual void setScriptDatei( Framework::Text* pfad ) = 0;
         virtual bool neuLaden() = 0;
         virtual void reset() = 0;
-        virtual void setCallbackParam( void *p ) = 0;
-        virtual void setCallbackFunktion( void( *funktion )( void *, Framework::RCArray< KSGSVariable > *, KSGSVariable ** ) ) = 0;
-        virtual void setSchriftZ( Framework::Schrift *s ) = 0;
-        virtual void setBildschirmZ( Framework::Bildschirm *s ) = 0;
-        virtual void doPublicMausEreignis( Framework::MausEreignis &me ) = 0;
-        virtual void doTastaturEreignis( Framework::TastaturEreignis &te ) = 0;
+        virtual void setCallbackParam( void* p ) = 0;
+        virtual void setCallbackFunktion( void(*funktion)(void*, Framework::RCArray< KSGSVariable >*, KSGSVariable**) ) = 0;
+        virtual void setSchriftZ( Framework::Schrift* s ) = 0;
+        virtual void setBildschirmZ( Framework::Bildschirm* s ) = 0;
+        virtual void doPublicMausEreignis( Framework::MausEreignis& me ) = 0;
+        virtual void doTastaturEreignis( Framework::TastaturEreignis& te ) = 0;
         virtual bool tick( double zeit ) = 0;
-        virtual void render( Framework::Bild &zRObj ) = 0;
-        virtual void setLog( Framework::TextFeld *log ) = 0;
+        virtual void render( Framework::Bild& zRObj ) = 0;
+        virtual void setLog( Framework::TextFeld* log ) = 0;
         // constant
-        virtual Framework::Text *getScriptDateiPfad() const = 0;
-        virtual Framework::Text *zScriptDateiPfad() const = 0;
-        virtual Framework::Schrift *getSchrift() const = 0;
-        virtual Framework::Bildschirm *getBildschirm() const = 0;;
+        virtual Framework::Text* getScriptDateiPfad() const = 0;
+        virtual Framework::Text* zScriptDateiPfad() const = 0;
+        virtual Framework::Schrift* getSchrift() const = 0;
+        virtual Framework::Bildschirm* getBildschirm() const = 0;;
     };
 
     // Ein Textfeld, das eine Entwicklungsumgebung für die KSG-Script Sprache darstellt
     class KSGScriptEditor : virtual public Framework::ZeichnungHintergrund
     {
     public:
-        enum ColorType
+        enum class ColorType
         {
             KEYWORD,
             TYPENAME,
@@ -145,15 +145,15 @@ namespace KSGScript
         };
         // Setzt die zu verwendende Schrift
         //  s: Die Schrift
-        virtual void setSchriftZ( Framework::Schrift *s ) = 0;
+        virtual void setSchriftZ( Framework::Schrift* s ) = 0;
         // Setzt den zu verwendenden Text Renderer
         //  t: Der Text Renderer
-        virtual void setTextRendererZ( Framework::TextRenderer *t ) = 0;
+        virtual void setTextRendererZ( Framework::TextRenderer* t ) = 0;
         // Setzt den Text (das Script was verändert werden soll)
         //  txt: Der Text
-        virtual void setText( Framework::Text *txt ) = 0;
+        virtual void setText( Framework::Text* txt ) = 0;
         // Gibt den aktuellen Text zurück
-        virtual Framework::Text *zText() const = 0;
+        virtual Framework::Text* zText() const = 0;
         // Schaltet die Fehlererkennung ein oder aus
         //  on: 1, um die Fehlererkennung einzuschalten, 0 um sie auszuschalten
         virtual void setErrorDetection( bool on = 1 ) = 0;
@@ -170,11 +170,11 @@ namespace KSGScript
         virtual void setTextColor( int color, ColorType cType ) = 0;
     };
     // DLL Einstieg
-    typedef KSGScriptEditor *( *KSGSGetEditor )( );
-    typedef KSGScriptObj *( *KSGSGetZeichnung )( );
-    typedef KSGSVariable *( *KSGSGetVariable )( KSGScriptObj *zObj, KSGSVariableDef *def );
-    typedef KSGSExpressionEvaluator *( *KSGSGetExpressionEvaluator )( );
-    typedef void ( *KSGSSetBild )( KSGSVariable *zBv, Framework::Bild *b );
+    typedef KSGScriptEditor* (*KSGSGetEditor)();
+    typedef KSGScriptObj* (*KSGSGetZeichnung)();
+    typedef KSGSVariable* (*KSGSGetVariable)(KSGScriptObj* zObj, KSGSVariableDef* def);
+    typedef KSGSExpressionEvaluator* (*KSGSGetExpressionEvaluator)();
+    typedef void (*KSGSSetBild)(KSGSVariable* zBv, Framework::Bild* b);
 }
 #define KSGS_START_FUNKTION "GetNewKSGScriptObj"
 #define KSGS_EDITOR_FUNKTION "GetNewKSGEditorObj"

+ 26 - 26
ksgScript/Main/KSGSExpressionEvaluator.cpp

@@ -30,8 +30,8 @@ void KSGSExpressionEvaluatorImpl::compile()
     classes->leeren();
     variables->leeren();
     Framework::Text script = "func double start(";
-    Iterator<Text *> name = paramNames->getIterator();
-    for( Iterator<KSGSVariable *> it = params->getIterator(); it && name; it = it.next(), name = name.next() )
+    Iterator<Text*> name = paramNames->begin();
+    for( Iterator<KSGSVariable*> it = params->begin(); it && name; it = it.next(), name = name.next() )
     {
         switch( it->getTyp() )
         {
@@ -85,14 +85,14 @@ void KSGSExpressionEvaluatorImpl::compile()
             script += ", ";
     }
     script += Text( ") { return " ) + expression + Text( "; }" );
-    TextReader *expressionReader = new TextReader( new Text( script ) );
-    KSGSLeser *reader = new KSGSLeser( expressionReader, this, "expression" );
+    TextReader* expressionReader = new TextReader( new Text( script ) );
+    KSGSLeser* reader = new KSGSLeser( expressionReader, this, "expression" );
     if( !reader->laden() )
     {
         expressionReader->release();
         return;
     }
-    Array< KSGSVariableDef * > *varDefs = new Array< KSGSVariableDef * >();
+    Array< KSGSVariableDef* >* varDefs = new Array< KSGSVariableDef* >();
     if( !reader->compile( classes, functions, varDefs ) )
     {
         varDefs->release();
@@ -103,7 +103,7 @@ void KSGSExpressionEvaluatorImpl::compile()
     int vAnz = varDefs->getEintragAnzahl();
     for( int i = 0; i < vAnz; i++ )
     {
-        KSGSVariable *var = KSGSKlasseInstanz::erstellVariable( this, varDefs->get( i ) );
+        KSGSVariable* var = KSGSKlasseInstanz::erstellVariable( this, varDefs->get( i ) );
         if( var )
             variables->add( var );
         delete varDefs->get( i );
@@ -113,17 +113,17 @@ void KSGSExpressionEvaluatorImpl::compile()
 
 }
 
-KSGSVariable *KSGSExpressionEvaluatorImpl::createParameter( Framework::Text name, int type )
+KSGSVariable* KSGSExpressionEvaluatorImpl::createParameter( Framework::Text name, int type )
 {
     this->paramNames->add( new Text( name ) );
-    KSGSVariable *var = KSGSKlasseInstanz::erstellVariable( this, new KSGSVariableDef{ type, 0, 0, "" } );
-    this->params->add( dynamic_cast<KSGSVariable *>( var->getThis() ) );
+    KSGSVariable* var = KSGSKlasseInstanz::erstellVariable( this, new KSGSVariableDef{ type, 0, 0, "" } );
+    this->params->add( dynamic_cast<KSGSVariable*>(var->getThis()) );
     if( this->expression.getLength() > 0 )
         compile();
     return var;
 }
 
-KSGSVariable *KSGSExpressionEvaluatorImpl::getParameter( Framework::Text name )
+KSGSVariable* KSGSExpressionEvaluatorImpl::getParameter( Framework::Text name )
 {
     int vAnz = paramNames->getEintragAnzahl();
     for( int i = 0; i < vAnz; i++ )
@@ -140,21 +140,21 @@ void KSGSExpressionEvaluatorImpl::setExpression( Framework::Text expression )
     compile();
 }
 
-KSGSVariable *KSGSExpressionEvaluatorImpl::evaluate()
+KSGSVariable* KSGSExpressionEvaluatorImpl::evaluate()
 {
     if( functions->getEintragAnzahl() > 0 )
-        return startFunktion( functions->z( 0 )->getId(), dynamic_cast<RCArray<KSGSVariable>*>( params->getThis() ) );
+        return startFunktion( functions->z( 0 )->getId(), dynamic_cast<RCArray<KSGSVariable>*>(params->getThis()) );
     return 0;
 }
 
-void KSGSExpressionEvaluatorImpl::logNachricht( char *n )
+void KSGSExpressionEvaluatorImpl::logNachricht( char* n )
 {
     std::cout << n << "\n";
 }
 
-Framework::Text *KSGSExpressionEvaluatorImpl::convertPfad( char *pf )
+Framework::Text* KSGSExpressionEvaluatorImpl::convertPfad( char* pf )
 {
-    Text *ret = new Text( pf );
+    Text* ret = new Text( pf );
     ret->ersetzen( '\\', '/' );
     if( ret->getText()[ 0 ] == '/' )
     {
@@ -164,12 +164,12 @@ Framework::Text *KSGSExpressionEvaluatorImpl::convertPfad( char *pf )
     return ret;
 }
 
-void KSGSExpressionEvaluatorImpl::setVariable( int id, KSGSVariable *var )
+void KSGSExpressionEvaluatorImpl::setVariable( int id, KSGSVariable* var )
 {
     variables->set( var, id );
 }
 
-KSGSVariable *KSGSExpressionEvaluatorImpl::startFunktion( int id, Framework::RCArray< KSGSVariable > *parameter )
+KSGSVariable* KSGSExpressionEvaluatorImpl::startFunktion( int id, Framework::RCArray< KSGSVariable >* parameter )
 {
     if( !functions->z( id ) || functions->z( id )->getSichtbarkeit() != 0 )
     {
@@ -177,13 +177,13 @@ KSGSVariable *KSGSExpressionEvaluatorImpl::startFunktion( int id, Framework::RCA
         parameter->release();
         return 0;
     }
-    KSGSFunktionInstanz *inst = functions->z( id )->erstellInstanz( dynamic_cast<KSGScriptProcessor *>( getThis() ), 0, parameter );
-    KSGSVariable *ret = inst->startFunktion();
+    KSGSFunktionInstanz* inst = functions->z( id )->erstellInstanz( dynamic_cast<KSGScriptProcessor*>(getThis()), 0, parameter );
+    KSGSVariable* ret = inst->startFunktion();
     inst->release();
     return ret;
 }
 
-KSGSVariable *KSGSExpressionEvaluatorImpl::erstellKlassenInstanz( int id )
+KSGSVariable* KSGSExpressionEvaluatorImpl::erstellKlassenInstanz( int id )
 {
     int anz = classes->getEintragAnzahl();
     for( int i = 0; i < anz; i++ )
@@ -195,11 +195,11 @@ KSGSVariable *KSGSExpressionEvaluatorImpl::erstellKlassenInstanz( int id )
     return 0;
 }
 
-KSGSVariable *KSGSExpressionEvaluatorImpl::getVariable( int id ) const
+KSGSVariable* KSGSExpressionEvaluatorImpl::getVariable( int id ) const
 {
     if( !variables || !variables->z( id ) )
     {
-        error( 17, {}, (KSGScriptProcessor *)this );
+        error( 17, {}, (KSGScriptProcessor*)this );
         return 0;
     }
     return variables->get( id );
@@ -210,17 +210,17 @@ int KSGSExpressionEvaluatorImpl::getScriptId() const
     return 0;
 }
 
-Framework::Bildschirm *KSGSExpressionEvaluatorImpl::zBildschirm() const
+Framework::Bildschirm* KSGSExpressionEvaluatorImpl::zBildschirm() const
 {
     return 0;
 }
 
-Framework::Schrift *KSGSExpressionEvaluatorImpl::zSchrift() const
+Framework::Schrift* KSGSExpressionEvaluatorImpl::zSchrift() const
 {
     return 0;
 }
 
-int KSGSExpressionEvaluatorImpl::getFunktionId( const char *name ) const
+int KSGSExpressionEvaluatorImpl::getFunktionId( const char* name ) const
 {
     int anz = functions->getEintragAnzahl();
     for( int i = 0; i < anz; i++ )
@@ -236,7 +236,7 @@ bool KSGSExpressionEvaluatorImpl::istBeendet( int scrId ) const
     return false;
 }
 
-KSGSVariable *KSGSExpressionEvaluatorImpl::callback( Framework::RCArray< KSGSVariable > *parameter ) const
+KSGSVariable* KSGSExpressionEvaluatorImpl::callback( Framework::RCArray< KSGSVariable >* parameter ) const
 {
     parameter->release();
     return 0;

+ 5 - 5
ksgScript/ksgScript.vcxproj

@@ -22,32 +22,32 @@
     <ProjectGuid>{50E49628-0E0C-41A3-B48D-1E9EE553EC6F}</ProjectGuid>
     <Keyword>Win32Proj</Keyword>
     <RootNamespace>ksgScript</RootNamespace>
-    <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v142</PlatformToolset>
+    <PlatformToolset>v143</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v142</PlatformToolset>
+    <PlatformToolset>v143</PlatformToolset>
     <CharacterSet>MultiByte</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v142</PlatformToolset>
+    <PlatformToolset>v143</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>MultiByte</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v142</PlatformToolset>
+    <PlatformToolset>v143</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>MultiByte</CharacterSet>
   </PropertyGroup>