mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-29 12:18:01 +01:00
Move to standard integer types #1147
This commit is contained in:
@@ -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.
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user