Commit 87dc8a19 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

sqlite: Tools: Simplify fetchOne

Now that we don't have to manually time the request, we can just return
the result directly
parent 9bd4b181
......@@ -220,10 +220,9 @@ class Tools
Statement stmt( req );
stmt.execute( std::forward<Args>( args )... );
auto row = stmt.row();
std::shared_ptr<T> res;
if ( row != nullptr )
res = std::make_shared<T>( ml, row );
return res;
return std::make_shared<T>( ml, row );
return nullptr;
}
template <typename... Args>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment