use a tempalte here

This commit is contained in:
DarthArgus
2017-01-17 20:56:58 +00:00
parent 268bf22b45
commit 82e0c072ed
@@ -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 <typename T>
inline void getValue(T &buffer) const {
buffer = static_cast<T>(getValue());
}
void *getBuffer();
@@ -48,48 +44,4 @@ namespace DB {
}
// ----------------------------------------------------------------------
inline void DB::BindableLong::getValue(unsigned int &buffer) const
{
buffer=static_cast<unsigned int>(getValue());
}
// ----------------------------------------------------------------------
inline void DB::BindableLong::getValue(uint32 &buffer) const
{
buffer=static_cast<uint32>(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<int8>(getValue());
}
// ----------------------------------------------------------------------
inline void DB::BindableLong::getValue(uint8 &buffer) const
{
buffer=static_cast<uint8>(getValue());
}
// ======================================================================
#endif