diff --git a/engine/shared/library/sharedDatabaseInterface/src/shared/core/DbBindableLong.h b/engine/shared/library/sharedDatabaseInterface/src/shared/core/DbBindableLong.h index f4dc519c..2e72b2c1 100755 --- a/engine/shared/library/sharedDatabaseInterface/src/shared/core/DbBindableLong.h +++ b/engine/shared/library/sharedDatabaseInterface/src/shared/core/DbBindableLong.h @@ -29,14 +29,10 @@ namespace DB { void setValue(const long int rhs); BindableLong &operator=(const long int rhs); - // following alternate getValue's are provided for convenience, particularly in - // the auto-generated code: - void getValue(unsigned int &buffer) const; - void getValue(uint32 &buffer) const; // for some reason, our compiler is convinced that uint32 != unsigned int - void getValue(long int &buffer) const; - void getValue(int &buffer) const; - void getValue(int8 &buffer) const; - void getValue(uint8 &buffer) const; + template + inline void getValue(T &buffer) const { + buffer = static_cast(getValue()); + } void *getBuffer(); @@ -48,48 +44,4 @@ namespace DB { } -// ---------------------------------------------------------------------- - -inline void DB::BindableLong::getValue(unsigned int &buffer) const -{ - buffer=static_cast(getValue()); -} - -// ---------------------------------------------------------------------- - -inline void DB::BindableLong::getValue(uint32 &buffer) const -{ - buffer=static_cast(getValue()); -} - -// ---------------------------------------------------------------------- - -inline void DB::BindableLong::getValue(long int &buffer) const -{ - buffer=getValue(); -} - -// ---------------------------------------------------------------------- - -inline void DB::BindableLong::getValue(int &buffer) const -{ - buffer=getValue(); -} - -// ---------------------------------------------------------------------- - -inline void DB::BindableLong::getValue(int8 &buffer) const -{ - buffer=static_cast(getValue()); -} - -// ---------------------------------------------------------------------- - -inline void DB::BindableLong::getValue(uint8 &buffer) const -{ - buffer=static_cast(getValue()); -} - -// ====================================================================== - #endif