Skip to content

Commit

Permalink
Various small fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtv committed May 18, 2020
1 parent c6aaf45 commit 792009b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
7.1.1
- Compile fix for Visual Studio.
- Warning fix for clang.
- Also install `transaction_focus.hxx`. (#320)
7.1.0
- Query tuples straight into `std::tuple` using `transaction::stream()`!
- And, `stream_from` now supports more or less arbitrary queries.
Expand Down
3 changes: 3 additions & 0 deletions include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ nobase_include_HEADERS= pqxx/pqxx \
pqxx/internal/conversions.hxx \
pqxx/internal/encoding_group.hxx \
pqxx/internal/encodings.hxx \
pqxx/internal/ignore-deprecated-post.hxx \
pqxx/internal/ignore-deprecated-pre.hxx \
pqxx/internal/libpq-forward.hxx \
pqxx/internal/result_iter.hxx \
pqxx/internal/sql_cursor.hxx \
pqxx/internal/statement_parameters.hxx \
pqxx/internal/stream_iterator.hxx \
pqxx/internal/transaction_focus.hxx \
pqxx/internal/gates/connection-errorhandler.hxx \
pqxx/internal/gates/connection-largeobject.hxx \
pqxx/internal/gates/connection-notification_receiver.hxx \
Expand Down
2 changes: 1 addition & 1 deletion test/test26.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ std::map<int, int> update_years(connection &C)

// Note all different years currently occurring in the table, writing them
// and their correct mappings to m_conversions
for (auto const [y] :
for (auto const &[y] :
tx.stream<std::optional<int>>("SELECT year FROM pqxxevents"))
{
// Read year, and if it is non-null, note its converted value
Expand Down
4 changes: 2 additions & 2 deletions test/unit/test_errorhandler.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ namespace pqxx
{
template<> struct nullness<TestErrorHandler *>
{
static constexpr bool has_null{true};
static constexpr bool always_null{false};
[[maybe_unused]] static constexpr bool has_null{true};
[[maybe_unused]] static constexpr bool always_null{false};
static constexpr bool is_null(TestErrorHandler *e) noexcept
{
return e == nullptr;
Expand Down
2 changes: 1 addition & 1 deletion test/unit/test_result_iteration.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void test_result_iter()
pqxx::result r{tx.exec("SELECT generate_series(1, 3)")};

int total{0};
for (auto const [i] : r.iter<int>()) total += i;
for (auto const &[i] : r.iter<int>()) total += i;
PQXX_CHECK_EQUAL(total, 6, "iter() loop did not get the right values.");
}

Expand Down

0 comments on commit 792009b

Please sign in to comment.