Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
medialibrary
Commits
0cf87a23
Commit
0cf87a23
authored
Oct 09, 2015
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SqliteTools: Provide an int64 traits
parent
c7d5c974
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
src/database/SqliteTools.h
src/database/SqliteTools.h
+14
-3
No files found.
src/database/SqliteTools.h
View file @
0cf87a23
...
...
@@ -30,9 +30,10 @@ template <typename T, typename Enable = void>
struct
Traits
;
template
<
typename
T
>
struct
Traits
<
T
,
typename
std
::
enable_if
<
std
::
is_integral
<
typename
std
::
decay
<
T
>::
type
>::
value
>::
type
>
struct
Traits
<
T
,
typename
std
::
enable_if
<
std
::
is_integral
<
typename
std
::
decay
<
T
>::
type
>::
value
&&
!
IsSameDecay
<
T
,
int64_t
>::
value
>::
type
>
{
static
constexpr
int
(
*
Bind
)(
sqlite3_stmt
*
,
int
,
int
)
=
&
sqlite3_bind_int
;
...
...
@@ -90,6 +91,16 @@ struct Traits<std::nullptr_t>
}
};
template
<
typename
T
>
struct
Traits
<
T
,
typename
std
::
enable_if
<
IsSameDecay
<
T
,
int64_t
>::
value
>::
type
>
{
static
constexpr
int
(
*
Bind
)(
sqlite3_stmt
*
,
int
,
sqlite_int64
)
=
&
sqlite3_bind_int64
;
static
constexpr
sqlite_int64
(
*
Load
)(
sqlite3_stmt
*
,
int
)
=
&
sqlite3_column_int64
;
};
class
Tools
{
private:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment