OSDN Git Service

Replace UINT with unsigned
authorsdottaka <sdottaka@users.sourceforge.net>
Sat, 10 Oct 2015 15:29:13 +0000 (00:29 +0900)
committersdottaka <sdottaka@users.sourceforge.net>
Sat, 10 Oct 2015 15:29:13 +0000 (00:29 +0900)
Src/DirActions.cpp
Src/stringdiffs.cpp
Src/stringdiffsi.h

index 880915a..634a4d1 100644 (file)
@@ -1093,7 +1093,7 @@ void SetItemViewFlag(CDiffContext& ctxt, unsigned flag, unsigned mask)
 
        while (pos != NULL)
        {
-               UINT curFlags = ctxt.GetCustomFlags1(pos);
+               unsigned curFlags = ctxt.GetCustomFlags1(pos);
                curFlags &= ~mask; // Zero bits masked
                curFlags |= flag;
                ctxt.SetCustomFlags1(pos, curFlags);
index 405e6d9..4737b4e 100644 (file)
@@ -465,19 +465,19 @@ stringdiffs::PopulateDiffs()
 /* Given a hash value and a new character, return a new hash value. */
 #define HASH(h, c) ((c) + ROL (h, 7))
 
-UINT
-stringdiffs::Hash(const String & str, int begin, int end, UINT h) const
+unsigned
+stringdiffs::Hash(const String & str, int begin, int end, unsigned h) const
 {
        for (int i = begin; i <= end; ++i)
        {
-               UINT ch = (UINT)str[i];
+               unsigned ch = static_cast<unsigned>(str[i]);
                if (m_case_sensitive)
                {
                        h += HASH(h, ch);
                }
                else
                {
-                       ch = (UINT)_totupper(ch);
+                       ch = static_cast<unsigned>(_totupper(ch));
                        h += HASH(h, ch);
                }
        }
index d46b79e..23927d5 100644 (file)
@@ -66,7 +66,7 @@ private:
 private:
 
        void BuildWordsArray(const String & str, std::vector<word>& words);
-       UINT Hash(const String & str, int begin, int end, UINT h ) const;
+       unsigned Hash(const String & str, int begin, int end, unsigned h ) const;
        bool AreWordsSame(const word & word1, const word & word2) const;
        bool IsWord(const word & word1) const;
        /**