]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/HelpGen/src/sourcepainter.cpp
Fix conversion error in tooltips.
[wxWidgets.git] / utils / HelpGen / src / sourcepainter.cpp
index fbabb6644641ef54a55cb9a5d9d386272b389544..0c58ea54529f0f756256930fefabf9211b508e66 100644 (file)
 #endif
 
 #if defined( wxUSE_TEMPLATE_STL )
-
-       #include <map>
+#  include <map>
 #else
-
-       #include "wxstlac.h"
-
+#  include "wxstlac.h"
 #endif
 
 #include "sourcepainter.h"
@@ -403,10 +400,12 @@ void check_keyword_map( int keywordMapNr )
                // "make sure" the address of the first member of non-polimorphic class
                // coinsides with the address of the instance
 
+/*
                KeywordT dummy;
 
                if ( (char*)& dummy != &dummy.keyWord[0] )
                        throw;
+*/
 
                int size = sizeof(__gKeyWords) / sizeof( KeywordT );
 
@@ -637,23 +636,23 @@ void SourcePainter::GetResultString(string& result, MarkupTagsT tags)
 {
        // this method works, only if results of processing 
        // are collected
-       ASSERT( mCollectResultsOn ); 
+       // ASSERT( mCollectResultsOn ); 
        result = "";
 
-       int pos = 0;
+       unsigned pos = 0;
 
        for( size_t i = 0; i != mBlocks.size(); ++i )
        {
                int desc = mBlocks[i];
 
-               int len  = desc & 0xFFFF;
+               unsigned len  = desc & 0xFFFF;
                int rank = (desc >> 16) & 0xFFFF;
 
                result += tags[ rank_tags_map[rank] ].start;
 
-               for( int n = 0; n != len; ++n )
+               for( unsigned n = 0; n != len; ++n )
                
-                       result += mResultStr[pos+n];
+                       result += mResultStr[(unsigned int)(pos+n)];
 
                pos += len;