GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: src/zserio/SqliteFinalizer.h Lines: 3 3 100.0 %
Date: 2023-12-13 14:51:09 Branches: 0 0 - %

Line Branch Exec Source
1
#ifndef ZSERIO_SQLITE_FINALIZER_H_INC
2
#define ZSERIO_SQLITE_FINALIZER_H_INC
3
4
#include "sqlite3.h"
5
6
namespace zserio
7
{
8
9
/**
10
 * Helper class intended to be used as a Deleter in std::unique_ptr.
11
 */
12
struct SqliteFinalizer
13
{
14
    /**
15
     * Function call operator which finalizes the given SQLite statement.
16
     *
17
     * \param ptr SQLite statement.
18
     */
19
34
    void operator()(sqlite3_stmt* ptr) const
20
    {
21
34
        sqlite3_finalize(ptr);
22
34
    }
23
};
24
25
} // namespace zserio
26
27
#endif // ZSERIO_SQLITE_FINALIZER_H_INC