mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-07-14 00:01:30 -04:00
use a tempalte here
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user