S result;
result.reserve(str.size());
- while (it != end) result += Ascii::toLower(*it++);
+ while (it != end) result += static_cast<S::value_type>(Ascii::toLower(*it++));
return result;
}
typename S::iterator it = str.begin();
typename S::iterator end = str.end();
- while (it != end) { *it = Ascii::toLower(*it); ++it; }
+ while (it != end) { *it = static_cast<S::value_type>(Ascii::toLower(*it)); ++it; }
return str;
}
It end1 = str.begin() + pos + n;
while (it1 != end1 && it2 != end2)
{
- typename S::value_type c1(Ascii::toLower(*it1));
- typename S::value_type c2(Ascii::toLower(*it2));
+ typename S::value_type c1(static_cast<S::value_type>(Ascii::toLower(*it1)));
+ typename S::value_type c2(static_cast<S::value_type>(Ascii::toLower(*it2)));
if (c1 < c2)
return -1;
else if (c1 > c2)
typename S::const_iterator end = str.begin() + pos + n;
while (it != end && *ptr)
{
- typename S::value_type c1(Ascii::toLower(*it));
- typename S::value_type c2(Ascii::toLower(*ptr));
+ typename S::value_type c1(static_cast<S::value_type>(Ascii::toLower(*it)));
+ typename S::value_type c2(static_cast<S::value_type>(Ascii::toLower(*ptr)));
if (c1 < c2)
return -1;
else if (c1 > c2)
#ifdef _UNICODE
if (unich < 0x10000)
{
- ch = (TCHAR)unich;
+ ch = static_cast<TCHAR>(unich);
return;
}
else if (unich < 0x110000)
{
- ch = ((unich - 0x10000)/0x400 + 0xd800);
- ch += ((unich % 0x400) + 0xdc00);
+ ch = static_cast<TCHAR>(((unich - 0x10000)/0x400 + 0xd800));
+ ch += static_cast<TCHAR>(((unich % 0x400) + 0xdc00));
return;
}
lossy = TRUE;
// Report the differences of two files. DEPTH is the current directory
// depth.
-// WinMerge: add moved_blocks_flag for detecting moved blocks and
+// WinMerge: add bMoved_blocks_flag for detecting moved blocks and
// bin_file for getting info which file is binary file (can be NULL)
// Winmerge: assume S_ISREG() files, not pipes, directories or devices
struct change * diff_2_files (struct file_data filevec[], int depth, int * bin_status,
- int moved_blocks_flag, int * bin_file)
+ int bMoved_blocks_flag, int * bin_file)
{
int diags;
int i;
}
/* WinMerge moved block support */
- if (moved_blocks_flag)
+ if (bMoved_blocks_flag)
{
moved_block_analysis(&script, filevec);
}
unsigned ordinal = '?';
*key = '0';
if (NumberParser::tryParseHex(key, ordinal))
- value.assign(1, ordinal);
+ value.assign(1, static_cast<std::string::value_type>(ordinal));
*key = '#';
}
else