From 9663074e9e323e5a2c55282a350fbeaccc65bf33 Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Sun, 28 Apr 2013 12:49:02 -0500 Subject: [PATCH] clang/mac fixes --- Data/MySQL/include/Poco/Data/MySQL/Binder.h | 4 ++++ Data/MySQL/src/Binder.cpp | 12 ++++-------- Data/include/Poco/Data/Binding.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Data/MySQL/include/Poco/Data/MySQL/Binder.h b/Data/MySQL/include/Poco/Data/MySQL/Binder.h index 731a8437d..df2690ac6 100644 --- a/Data/MySQL/include/Poco/Data/MySQL/Binder.h +++ b/Data/MySQL/include/Poco/Data/MySQL/Binder.h @@ -86,12 +86,16 @@ public: virtual void bind(std::size_t pos, const Poco::UInt64& val, Direction dir); /// Binds an UInt64. +#ifndef POCO_LONG_IS_64_BIT + virtual void bind(std::size_t pos, const long& val, Direction dir = PD_IN); /// Binds a long. virtual void bind(std::size_t pos, const unsigned long& val, Direction dir = PD_IN); /// Binds an unsigned long. +#endif // POCO_LONG_IS_64_BIT + virtual void bind(std::size_t pos, const bool& val, Direction dir); /// Binds a boolean. diff --git a/Data/MySQL/src/Binder.cpp b/Data/MySQL/src/Binder.cpp index 40262e109..33fb66883 100644 --- a/Data/MySQL/src/Binder.cpp +++ b/Data/MySQL/src/Binder.cpp @@ -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) { 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); -#endif } void Binder::bind(std::size_t pos, const unsigned long& val, Direction dir) { 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); -#endif } +#endif // POCO_LONG_IS_64_BIT + void Binder::bind(std::size_t pos, const bool& val, Direction dir) { diff --git a/Data/include/Poco/Data/Binding.h b/Data/include/Poco/Data/Binding.h index 08e54bbf2..5d588defd 100644 --- a/Data/include/Poco/Data/Binding.h +++ b/Data/include/Poco/Data/Binding.h @@ -73,7 +73,7 @@ class Binding: public AbstractBinding /// function. An attempt to pass a constant by reference shall result in compile-time error. { public: - typedef typename T ValType; + typedef T ValType; typedef Binding Type; typedef SharedPtr 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()). { public: - typedef typename T ValType; + typedef T ValType; typedef SharedPtr ValPtr; typedef CopyBinding Type; typedef SharedPtr Ptr;