clang/mac fixes

This commit is contained in:
Aleksandar Fabijanic
2013-04-28 12:49:02 -05:00
parent a50823c5a8
commit 9663074e9e
3 changed files with 10 additions and 10 deletions

View File

@@ -86,12 +86,16 @@ public:
virtual void bind(std::size_t pos, const Poco::UInt64& val, Direction dir); virtual void bind(std::size_t pos, const Poco::UInt64& val, Direction dir);
/// Binds an UInt64. /// Binds an UInt64.
#ifndef POCO_LONG_IS_64_BIT
virtual void bind(std::size_t pos, const long& val, Direction dir = PD_IN); virtual void bind(std::size_t pos, const long& val, Direction dir = PD_IN);
/// Binds a long. /// Binds a long.
virtual void bind(std::size_t pos, const unsigned long& val, Direction dir = PD_IN); virtual void bind(std::size_t pos, const unsigned long& val, Direction dir = PD_IN);
/// Binds an unsigned long. /// Binds an unsigned long.
#endif // POCO_LONG_IS_64_BIT
virtual void bind(std::size_t pos, const bool& val, Direction dir); virtual void bind(std::size_t pos, const bool& val, Direction dir);
/// Binds a boolean. /// Binds a boolean.

View File

@@ -113,27 +113,23 @@ void Binder::bind(std::size_t pos, const Poco::UInt64& val, Direction dir)
} }
#ifndef POCO_LONG_IS_64_BIT
void Binder::bind(std::size_t pos, const long& val, Direction dir) void Binder::bind(std::size_t pos, const long& val, Direction dir)
{ {
poco_assert(dir == PD_IN); poco_assert(dir == PD_IN);
#ifdef POCO_LONG_IS_64_BIT
realBind(pos, MYSQL_TYPE_LONGLONG, &val, 0);
#else
realBind(pos, MYSQL_TYPE_LONG, &val, 0); realBind(pos, MYSQL_TYPE_LONG, &val, 0);
#endif
} }
void Binder::bind(std::size_t pos, const unsigned long& val, Direction dir) void Binder::bind(std::size_t pos, const unsigned long& val, Direction dir)
{ {
poco_assert(dir == PD_IN); poco_assert(dir == PD_IN);
#ifdef POCO_LONG_IS_64_BIT
realBind(pos, MYSQL_TYPE_LONGLONG, &val, 0, true);
#else
realBind(pos, MYSQL_TYPE_LONG, &val, 0, true); realBind(pos, MYSQL_TYPE_LONG, &val, 0, true);
#endif
} }
#endif // POCO_LONG_IS_64_BIT
void Binder::bind(std::size_t pos, const bool& val, Direction dir) void Binder::bind(std::size_t pos, const bool& val, Direction dir)
{ {

View File

@@ -73,7 +73,7 @@ class Binding: public AbstractBinding
/// function. An attempt to pass a constant by reference shall result in compile-time error. /// function. An attempt to pass a constant by reference shall result in compile-time error.
{ {
public: public:
typedef typename T ValType; typedef T ValType;
typedef Binding<ValType> Type; typedef Binding<ValType> Type;
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;
@@ -142,7 +142,7 @@ class CopyBinding: public AbstractBinding
/// Variables can be passed as either copies or references (i.e. using either use() or bind()). /// Variables can be passed as either copies or references (i.e. using either use() or bind()).
{ {
public: public:
typedef typename T ValType; typedef T ValType;
typedef SharedPtr<ValType> ValPtr; typedef SharedPtr<ValType> ValPtr;
typedef CopyBinding<ValType> Type; typedef CopyBinding<ValType> Type;
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;