diff options
Diffstat (limited to 'cpp/test/Freeze/dbmap/Client.cpp')
-rw-r--r-- | cpp/test/Freeze/dbmap/Client.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cpp/test/Freeze/dbmap/Client.cpp b/cpp/test/Freeze/dbmap/Client.cpp index c785ac880c6..84466d982f6 100644 --- a/cpp/test/Freeze/dbmap/Client.cpp +++ b/cpp/test/Freeze/dbmap/Client.cpp @@ -60,10 +60,10 @@ populateDB(MAP& m) for(vector<Byte>::const_iterator j = alphabet.begin(); j != alphabet.end(); ++j) { -#ifdef _MSC_VER - m.insert(MAP::value_type(*j, j-alphabet.begin())); +#if defined(_MSC_VER) || (defined(__SUNPRO_CC) && __SUNPRO_CC <= 0x530) + m.insert(MAP::value_type(*j, static_cast<Int>(j - alphabet.begin()))); #else - m.insert(typename MAP::value_type(*j, j-alphabet.begin())); + m.insert(typename MAP::value_type(*j, static_cast<Int>(j - alphabet.begin()))); #endif } } @@ -307,13 +307,13 @@ run(int argc, char* argv[], MAP& m) // j = find(alphabet.begin(), alphabet.end(), 'n'); map<Byte, const Int> pairs; - pairs.insert(pair<const Byte, const Int>(*j, j - alphabet.begin())); + pairs.insert(pair<const Byte, const Int>(*j, static_cast<Int>(j - alphabet.begin()))); ++j; - pairs.insert(pair<const Byte, const Int>(*j, j - alphabet.begin())); + pairs.insert(pair<const Byte, const Int>(*j, static_cast<Int>(j - alphabet.begin()))); ++j; - pairs.insert(pair<const Byte, const Int>(*j, j - alphabet.begin())); + pairs.insert(pair<const Byte, const Int>(*j, static_cast<Int>(j - alphabet.begin()))); ++j; - pairs.insert(pair<const Byte, const Int>(*j, j - alphabet.begin())); + pairs.insert(pair<const Byte, const Int>(*j, static_cast<Int>(j - alphabet.begin()))); p = find_first_of(m.begin(), m.end(), pairs.begin(), pairs.end()); test(p != m.end()); |