Skip to content

Commit

Permalink
No effect, simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed May 21, 2024
1 parent fd790c9 commit 87a9101
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/tao/pq/result.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ namespace tao::pq
if( empty() ) {
return std::nullopt;
}
return std::optional< T >( as< T >() );
return as< T >();
}

template< typename T, typename U >
Expand Down
4 changes: 2 additions & 2 deletions include/tao/pq/result_traits_optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ struct tao::pq::result_traits< std::optional< T > >

[[nodiscard]] static auto from( const char* value ) -> std::optional< T >
{
return std::optional< T >( result_traits< T >::from( value ) );
return result_traits< T >::from( value );
}

template< typename Row >
[[nodiscard]] static auto from( const Row& row ) -> std::optional< T >
{
for( std::size_t column = 0; column < row.columns(); ++column ) {
if( !row.is_null( column ) ) {
return std::optional< T >( result_traits< T >::from( row ) );
return result_traits< T >::from( row );
}
}
return null();
Expand Down

0 comments on commit 87a9101

Please sign in to comment.