Skip to content

Commit 6cab8f2

Browse files
committed
Follow @asfernandes suggestions.
1 parent 18d3b26 commit 6cab8f2

File tree

2 files changed

+17
-19
lines changed

2 files changed

+17
-19
lines changed

src/include/fb_types.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,22 @@ typedef FB_UINT64 ISC_UINT64;
8181

8282
typedef ISC_QUAD SQUAD;
8383

84+
const SQUAD NULL_BLOB = { 0, 0 };
85+
86+
inline bool operator==(const SQUAD& s1, const SQUAD& s2)
87+
{
88+
return s1.gds_quad_high == s2.gds_quad_high &&
89+
s2.gds_quad_low == s1.gds_quad_low;
90+
}
91+
92+
inline bool operator>(const SQUAD& s1, const SQUAD& s2)
93+
{
94+
return (s1.gds_quad_high > s2.gds_quad_high) ||
95+
(s1.gds_quad_high == s2.gds_quad_high &&
96+
s1.gds_quad_low > s2.gds_quad_low);
97+
}
98+
99+
84100
/*
85101
* TMN: some misc data types from all over the place
86102
*/

src/remote/remote.h

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -193,21 +193,6 @@ struct Rdb : public Firebird::GlobalStorage, public TypedHandle<rem_type_rdb>
193193
};
194194

195195

196-
const SQUAD NULL_BLOB = {0, 0};
197-
198-
inline bool operator==(const SQUAD& s1, const SQUAD& s2)
199-
{
200-
return s1.gds_quad_high == s2.gds_quad_high &&
201-
s2.gds_quad_low == s1.gds_quad_low;
202-
}
203-
204-
inline bool operator>(const SQUAD& s1, const SQUAD& s2)
205-
{
206-
return s1.gds_quad_high > s2.gds_quad_high ||
207-
s1.gds_quad_high == s2.gds_quad_high &&
208-
s1.gds_quad_low > s2.gds_quad_low;
209-
}
210-
211196
struct Rtr : public Firebird::GlobalStorage, public TypedHandle<rem_type_rtr>
212197
{
213198
using BlobsTree = Firebird::BePlusTree<struct Rbl*, SQUAD, MemoryPool, struct Rbl>;
@@ -268,10 +253,7 @@ struct RBlobInfo
268253
// Used in XDR
269254
class RemBlobBuffer : public Firebird::HalfStaticArray<UCHAR, BLOB_LENGTH>
270255
{
271-
public:
272-
RemBlobBuffer(Firebird::MemoryPool& pool) :
273-
Firebird::HalfStaticArray<UCHAR, BLOB_LENGTH>(pool)
274-
{}
256+
using Firebird::HalfStaticArray<UCHAR, BLOB_LENGTH>::HalfStaticArray;
275257
};
276258

277259
struct Rbl : public Firebird::GlobalStorage, public TypedHandle<rem_type_rbl>

0 commit comments

Comments
 (0)