diff UI/UIHouses.cpp @ 1843:2e6d3cd052e0

some char* cast removal + adding const_casts where appropriate
author Grumpy7
date Sun, 13 Oct 2013 07:18:03 +0200
parents 211dfe2d8db1
children 140ca8123384
line wrap: on
line diff
--- a/UI/UIHouses.cpp	Sun Oct 13 06:32:06 2013 +0200
+++ b/UI/UIHouses.cpp	Sun Oct 13 07:18:03 2013 +0200
@@ -1654,10 +1654,10 @@
     {
       pStringSum = 1;
       pTextHeight = 0;
-      pShopOptions[0] = (char *)pGlobalTXT_LocalizationStrings[604];//Охота за вознаграждение
+      pShopOptions[0] = const_cast<char *>(pGlobalTXT_LocalizationStrings[604]);//Охота за вознаграждение
       if ( pParty->uFine > 0 )
       {
-        pShopOptions[1] = (char *)pGlobalTXT_LocalizationStrings[603];//Заплатить штраф
+        pShopOptions[1] = const_cast<char *>(pGlobalTXT_LocalizationStrings[603]);//Заплатить штраф
         pStringSum = 2;
       }
       for ( uint i = 0; i < pStringSum; ++i )
@@ -2158,11 +2158,11 @@
       if ( HouseUI_CheckIfPlayerCanInteract() )
       {
         pOptionsCount = 2;
-        pShopOptions[0] = (char *)pGlobalTXT_LocalizationStrings[620];//Правила
-        pShopOptions[1] = (char *)pGlobalTXT_LocalizationStrings[622];//Условия победы
+        pShopOptions[0] = const_cast<char *>(pGlobalTXT_LocalizationStrings[620]);//Правила
+        pShopOptions[1] = const_cast<char *>(pGlobalTXT_LocalizationStrings[622]);//Условия победы
         if ( pParty->HasItem(651) )//651 - Колода для игры в АркоМэйдж в Items.txt
         {
-          pShopOptions[2] = (char *)pGlobalTXT_LocalizationStrings[621];//Играть
+          pShopOptions[2] = const_cast<char *>(pGlobalTXT_LocalizationStrings[621]);//Играть
           pOptionsCount = 3;
         }
         for ( i = 0; i < pOptionsCount; ++i )
@@ -2230,8 +2230,8 @@
       pShopOptions[0] = pTmpBuf.data();
       index = 0;
     }
-    pShopOptions[1] = (char *)pGlobalTXT_LocalizationStrings[68];//"Пожертвовать"
-    pShopOptions[2] = (char *)pGlobalTXT_LocalizationStrings[160];//"Обучиться навыкам"
+    pShopOptions[1] = const_cast<char *>(pGlobalTXT_LocalizationStrings[68]);//"Пожертвовать"
+    pShopOptions[2] = const_cast<char *>(pGlobalTXT_LocalizationStrings[160]);//"Обучиться навыкам"
     all_text_height = 0;
     if ( index < pDialogueWindow->pNumPresenceButton )
     {
@@ -2514,7 +2514,7 @@
       {
         index = 0;
         pShopOptions[0] = pTmpBuf.data();
-        pShopOptions[1] = (char *)pGlobalTXT_LocalizationStrings[160];// "Learn Skills"
+        pShopOptions[1] = const_cast<char *>(pGlobalTXT_LocalizationStrings[160]);// "Learn Skills"
         if ( pDialogueWindow->pStartingPosActiveItem < pDialogueWindow->pStartingPosActiveItem + pDialogueWindow->pNumPresenceButton )
         {
           for ( int i = pDialogueWindow->pStartingPosActiveItem;