Skip to content

Commit

Permalink
Silence clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Mar 28, 2020
1 parent 14db6ed commit 4fe02a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions include/tao/pq/internal/parameter_text_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,16 @@ namespace tao::pq::internal
};

template< typename ElementType, std::size_t Extent >
struct parameter_text_traits< tao::span< ElementType, Extent >, std::enable_if_t< is_bytea_parameter< ElementType >::value > >
struct parameter_text_traits< tao::span< ElementType, Extent >, std::enable_if_t< is_bytea_parameter< ElementType >::value > > // NOLINT(cppcoreguidelines-special-member-functions)
{
private:
unsigned char* m_data;

public:
explicit parameter_text_traits( PGconn* c, const tao::span< const ElementType, Extent > v, std::size_t dummy = 0 )
: m_data( PQescapeByteaConn( c, (unsigned char*)v.data(), v.size(), &dummy ) )
: m_data( PQescapeByteaConn( c, (unsigned char*)v.data(), v.size(), &dummy ) ) // NOLINT
{
if( !m_data ) {
if( m_data == nullptr ) {
throw std::bad_alloc();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/pq/basic_datatypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace tao::pq
explicit bytea( const char* value )
: m_size( 0 ), m_data( PQunescapeBytea( (unsigned char*)value, &m_size ) ) //NOLINT
{
if( !m_data ) {
if( m_data == nullptr ) {
throw std::bad_alloc();
}
}
Expand Down

0 comments on commit 4fe02a5

Please sign in to comment.