Skip to content

Commit 129b665

Browse files
committed
Fix problems
1 parent 996f2f0 commit 129b665

3 files changed

Lines changed: 18 additions & 13 deletions

File tree

src/lib/CalendarConverter.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,6 @@ namespace fbcpp::impl
134134

135135
OpaqueTime timeToOpaqueTime(const Time& time)
136136
{
137-
const auto duration = time.to_duration();
138-
139137
const auto hours = static_cast<unsigned>(time.hours().count());
140138
const auto minutes = static_cast<unsigned>(time.minutes().count());
141139
const auto seconds = static_cast<unsigned>(time.seconds().count());

src/lib/Statement.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ namespace fbcpp
199199
: attachment{o.attachment},
200200
status{std::move(o.status)},
201201
statusWrapper{std::move(o.statusWrapper)},
202-
calendarConverter{std::move(calendarConverter)},
203-
numericConverter{std::move(numericConverter)},
202+
calendarConverter{std::move(o.calendarConverter)},
203+
numericConverter{std::move(o.numericConverter)},
204204
statementHandle{std::move(o.statementHandle)},
205205
resultSetHandle{std::move(o.resultSetHandle)},
206206
inMetadata{std::move(o.inMetadata)},

src/lib/types.h

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ namespace fbcpp
117117
///
118118
struct Timestamp final
119119
{
120-
bool operator==(const Timestamp& other) const noexcept
120+
bool operator==(const Timestamp& o) const noexcept
121121
{
122-
return date == other.date && time.to_duration() == other.time.to_duration();
122+
return date == o.date && time.to_duration() == o.time.to_duration();
123123
}
124124

125125
///
@@ -160,9 +160,9 @@ namespace fbcpp
160160
///
161161
struct TimeTz final
162162
{
163-
bool operator==(const TimeTz& other) const noexcept
163+
bool operator==(const TimeTz& o) const noexcept
164164
{
165-
return utcTime.to_duration() == other.utcTime.to_duration() && zone == other.zone;
165+
return utcTime.to_duration() == o.utcTime.to_duration() && zone == o.zone;
166166
}
167167

168168
///
@@ -245,10 +245,9 @@ namespace fbcpp
245245
///
246246
struct alignas(alignof(ISC_TIMESTAMP)) OpaqueTimestamp final
247247
{
248-
bool operator==(const OpaqueTimestamp& other) const noexcept
248+
bool operator==(const OpaqueTimestamp& o) const noexcept
249249
{
250-
return value.timestamp_date == other.value.timestamp_date &&
251-
value.timestamp_time == other.value.timestamp_time;
250+
return value.timestamp_date == o.value.timestamp_date && value.timestamp_time == o.value.timestamp_time;
252251
}
253252

254253
///
@@ -262,7 +261,10 @@ namespace fbcpp
262261
///
263262
struct alignas(alignof(ISC_TIME_TZ)) OpaqueTimeTz final
264263
{
265-
bool operator==(const OpaqueTimeTz&) const noexcept = default;
264+
bool operator==(const OpaqueTimeTz& o) const noexcept
265+
{
266+
return value.utc_time == o.value.utc_time && value.time_zone == o.value.time_zone;
267+
}
266268

267269
///
268270
/// Raw Firebird time-with-time-zone representation.
@@ -275,7 +277,12 @@ namespace fbcpp
275277
///
276278
struct alignas(alignof(ISC_TIMESTAMP_TZ)) OpaqueTimestampTz final
277279
{
278-
bool operator==(const OpaqueTimestampTz&) const noexcept = default;
280+
bool operator==(const OpaqueTimestampTz& o) const noexcept
281+
{
282+
return value.utc_timestamp.timestamp_date == o.value.utc_timestamp.timestamp_date &&
283+
value.utc_timestamp.timestamp_time == o.value.utc_timestamp.timestamp_time &&
284+
value.time_zone == o.value.time_zone;
285+
}
279286

280287
///
281288
/// Raw Firebird timestamp-with-time-zone representation.

0 commit comments

Comments
 (0)