some MSVC Level 4 warning fixes

This commit is contained in:
Aleksandar Fabijanic 2008-03-17 14:27:29 +00:00
parent 3848bfbb53
commit 4ffed92894
5 changed files with 51 additions and 51 deletions

View File

@ -252,77 +252,77 @@ public:
return typeid(Data::BLOB);
}
void convert(Int8& val) const
void convert(Int8&) const
{
throw Poco::BadCastException();
}
void convert(Int16& val) const
void convert(Int16&) const
{
throw Poco::BadCastException();
}
void convert(Int32& val) const
void convert(Int32&) const
{
throw Poco::BadCastException();
}
void convert(Int64& val) const
void convert(Int64&) const
{
throw Poco::BadCastException();
}
void convert(UInt8& val) const
void convert(UInt8&) const
{
throw Poco::BadCastException();
}
void convert(UInt16& val) const
void convert(UInt16&) const
{
throw Poco::BadCastException();
}
void convert(UInt32& val) const
void convert(UInt32&) const
{
throw Poco::BadCastException();
}
void convert(UInt64& val) const
void convert(UInt64&) const
{
throw Poco::BadCastException();
}
void convert(bool& val) const
void convert(bool&) const
{
throw Poco::BadCastException();
}
void convert(float& val) const
void convert(float&) const
{
throw Poco::BadCastException();
}
void convert(double& val) const
void convert(double&) const
{
throw Poco::BadCastException();
}
void convert(char& val) const
void convert(char&) const
{
throw Poco::BadCastException();
}
void convert(Poco::Timestamp& val) const
void convert(Poco::Timestamp&) const
{
throw Poco::BadCastException();
}
void convert(Poco::DateTime& val) const
void convert(Poco::DateTime&) const
{
throw Poco::BadCastException();
}
void convert(Poco::LocalDateTime& val) const
void convert(Poco::LocalDateTime&) const
{
throw Poco::BadCastException();
}

View File

@ -182,62 +182,62 @@ public:
return typeid(Data::Date);
}
void convert(Int8& val) const
void convert(Int8&) const
{
throw Poco::BadCastException();
}
void convert(Int16& val) const
void convert(Int16&) const
{
throw Poco::BadCastException();
}
void convert(Int32& val) const
void convert(Int32&) const
{
throw Poco::BadCastException();
}
void convert(Int64& val) const
void convert(Int64&) const
{
throw Poco::BadCastException();
}
void convert(UInt8& val) const
void convert(UInt8&) const
{
throw Poco::BadCastException();
}
void convert(UInt16& val) const
void convert(UInt16&) const
{
throw Poco::BadCastException();
}
void convert(UInt32& val) const
void convert(UInt32&) const
{
throw Poco::BadCastException();
}
void convert(UInt64& val) const
void convert(UInt64&) const
{
throw Poco::BadCastException();
}
void convert(bool& val) const
void convert(bool&) const
{
throw Poco::BadCastException();
}
void convert(float& val) const
void convert(float&) const
{
throw Poco::BadCastException();
}
void convert(double& val) const
void convert(double&) const
{
throw Poco::BadCastException();
}
void convert(char& val) const
void convert(char&) const
{
throw Poco::BadCastException();
}

View File

@ -182,62 +182,62 @@ public:
return typeid(Data::Time);
}
void convert(Int8& val) const
void convert(Int8&) const
{
throw Poco::BadCastException();
}
void convert(Int16& val) const
void convert(Int16&) const
{
throw Poco::BadCastException();
}
void convert(Int32& val) const
void convert(Int32&) const
{
throw Poco::BadCastException();
}
void convert(Int64& val) const
void convert(Int64&) const
{
throw Poco::BadCastException();
}
void convert(UInt8& val) const
void convert(UInt8&) const
{
throw Poco::BadCastException();
}
void convert(UInt16& val) const
void convert(UInt16&) const
{
throw Poco::BadCastException();
}
void convert(UInt32& val) const
void convert(UInt32&) const
{
throw Poco::BadCastException();
}
void convert(UInt64& val) const
void convert(UInt64&) const
{
throw Poco::BadCastException();
}
void convert(bool& val) const
void convert(bool&) const
{
throw Poco::BadCastException();
}
void convert(float& val) const
void convert(float&) const
{
throw Poco::BadCastException();
}
void convert(double& val) const
void convert(double&) const
{
throw Poco::BadCastException();
}
void convert(char& val) const
void convert(char&) const
{
throw Poco::BadCastException();
}

View File

@ -131,11 +131,11 @@ protected:
poco_static_assert (std::numeric_limits<T>::is_signed);
if (std::numeric_limits<F>::is_integer)
checkUpperLimit(from, to);
checkUpperLimit<F,T>(from);
else
checkUpperLimitFloat(from, to);
checkUpperLimitFloat<F,T>(from);
checkLowerLimit(from, to);
checkLowerLimit<F,T>(from);
to = static_cast<T>(from);
}
@ -152,7 +152,7 @@ protected:
poco_static_assert (!std::numeric_limits<F>::is_signed);
poco_static_assert (!std::numeric_limits<T>::is_signed);
checkUpperLimit(from, to);
checkUpperLimit<F,T>(from);
to = static_cast<T>(from);
}
@ -170,7 +170,7 @@ protected:
if (from < 0)
throw RangeException("Value too small.");
checkUpperLimit(from, to);
checkUpperLimit<F,T>(from);
to = static_cast<T>(from);
}
@ -189,7 +189,7 @@ protected:
if (from < 0)
throw RangeException("Value too small.");
checkUpperLimitFloat(from, to);
checkUpperLimitFloat<F,T>(from);
to = static_cast<T>(from);
}
@ -205,13 +205,13 @@ protected:
poco_static_assert (!std::numeric_limits<F>::is_signed);
poco_static_assert (std::numeric_limits<T>::is_signed);
checkUpperLimit(from, to);
checkUpperLimit<F,T>(from);
to = static_cast<T>(from);
}
private:
template <typename F, typename T>
void checkUpperLimit(const F& from, T& to) const
void checkUpperLimit(const F& from) const
{
if ((sizeof(T) < sizeof(F)) &&
(from > static_cast<F>(std::numeric_limits<T>::max())))
@ -226,14 +226,14 @@ private:
}
template <typename F, typename T>
void checkUpperLimitFloat(const F& from, T& to) const
void checkUpperLimitFloat(const F& from) const
{
if (from > std::numeric_limits<T>::max())
throw RangeException("Value too large.");
}
template <typename F, typename T>
void checkLowerLimit(const F& from, T& to) const
void checkLowerLimit(const F& from) const
{
if (from < std::numeric_limits<T>::min())
throw RangeException("Value too small.");

View File

@ -167,7 +167,7 @@ void SocketIOChannelTest::testActiveChannelStream()
ActiveIOChannel<SocketIOChannel> activeChannel(network);
ActiveResult<int> result1 = activeChannel.write(str1);
result1.wait();
ActiveResult<std::string> result2 = activeChannel.read(0);
ActiveResult<std::string> result2 = activeChannel.read();
result2.wait();
assert("1234567890" == result2.data());
}
@ -250,7 +250,7 @@ void SocketIOChannelTest::testActiveChannelDatagram()
ActiveIOChannel<SocketIOChannel> activeChannel(network);
ActiveResult<int> result1 = activeChannel.write(str1);
result1.wait();
ActiveResult<std::string> result2 = activeChannel.read(0);
ActiveResult<std::string> result2 = activeChannel.read();
result2.wait();
assert("1234567890" == result2.data());
}