Move to standard integer types #1147

This commit is contained in:
Alex Fabijanic
2017-10-05 14:02:36 -05:00
parent f68e0174b6
commit a6fa326c26
18 changed files with 117 additions and 130 deletions

View File

@@ -1393,6 +1393,30 @@ inline AbstractBinding::Ptr use(T& t, const std::string& name = "")
}
template <>
inline AbstractBinding::Ptr use(long& t, const std::string& name)
/// Convenience function for a more compact Binding creation.
{
#ifndef POCO_LONG_IS_64_BIT
return new Binding<long>(t, name, AbstractBinding::PD_IN);
#else
return new Binding<Poco::Int64>(reinterpret_cast<Poco::Int64&>(t), name, AbstractBinding::PD_IN);
#endif
}
template <>
inline AbstractBinding::Ptr use(unsigned long& t, const std::string& name)
/// Convenience function for a more compact Binding creation.
{
#ifndef POCO_LONG_IS_64_BIT
return new Binding<unsigned long>(t, name, AbstractBinding::PD_IN);
#else
return new Binding<Poco::UInt64>(reinterpret_cast<Poco::UInt64&>(t), name, AbstractBinding::PD_IN);
#endif
}
inline AbstractBinding::Ptr use(const NullData& t, const std::string& name = "")
/// NullData overload.
{