Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
02e1935c
Commit
02e1935c
authored
Aug 25, 2017
by
Ronan
Browse files
feat(core): use static on inline funcs
parent
89745baa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
src/cpim/parser/cpim-parser.cpp
src/cpim/parser/cpim-parser.cpp
+2
-2
src/db/events-db.cpp
src/db/events-db.cpp
+5
-5
No files found.
src/cpim/parser/cpim-parser.cpp
View file @
02e1935c
...
...
@@ -279,7 +279,7 @@ shared_ptr<Cpim::Header> Cpim::Parser::cloneHeader (const Header &header) {
class
EmptyObject
{};
inline
bool
headerIsValid
(
const
shared_ptr
<
belr
::
Grammar
>
&
grammar
,
const
string
&
input
)
{
static
bool
headerIsValid
(
const
shared_ptr
<
belr
::
Grammar
>
&
grammar
,
const
string
&
input
)
{
belr
::
Parser
<
shared_ptr
<
EmptyObject
>
>
parser
(
grammar
);
parser
.
setHandler
(
"Header"
,
belr
::
make_fn
(
make_shared
<
EmptyObject
>
)
...
...
@@ -307,7 +307,7 @@ bool Cpim::Parser::headerParameterIsValid (const string &headerParameter) const
// -----------------------------------------------------------------------------
inline
bool
coreHeaderIsValid
(
static
bool
coreHeaderIsValid
(
const
shared_ptr
<
belr
::
Grammar
>
&
grammar
,
const
string
&
headerName
,
const
string
&
headerValue
,
...
...
src/db/events-db.cpp
View file @
02e1935c
...
...
@@ -48,21 +48,21 @@ EventsDb::EventsDb () : AbstractDb(*new EventsDbPrivate) {}
// Helpers.
// -----------------------------------------------------------------------------
constexpr
pair
<
EventsDb
::
Filter
,
const
char
*>
eventFilterToSql
[]{
static
constexpr
pair
<
EventsDb
::
Filter
,
const
char
*>
eventFilterToSql
[]
=
{
{
EventsDb
::
MessageFilter
,
"1"
},
{
EventsDb
::
CallFilter
,
"2"
},
{
EventsDb
::
ConferenceFilter
,
"3"
}
};
constexpr
const
char
*
mapEventFilterToSql
(
EventsDb
::
Filter
filter
)
{
static
constexpr
const
char
*
mapEventFilterToSql
(
EventsDb
::
Filter
filter
)
{
return
eventFilterToSql
[
filter
].
second
;
}
constexpr
const
char
*
mapMessageDirectionToSql
(
Message
::
Direction
direction
)
{
static
constexpr
const
char
*
mapMessageDirectionToSql
(
Message
::
Direction
direction
)
{
return
direction
==
Message
::
Direction
::
Incoming
?
"1"
:
"2"
;
}
constexpr
pair
<
Message
::
State
,
const
char
*>
messageStateToSql
[]{
static
constexpr
pair
<
Message
::
State
,
const
char
*>
messageStateToSql
[]
=
{
{
Message
::
Idle
,
"1"
},
{
Message
::
InProgress
,
"2"
},
{
Message
::
Delivered
,
"3"
},
...
...
@@ -73,7 +73,7 @@ constexpr pair<Message::State, const char *> messageStateToSql[]{
{
Message
::
Displayed
,
"8"
}
};
constexpr
const
char
*
mapMessageStateToSql
(
Message
::
State
state
)
{
static
constexpr
const
char
*
mapMessageStateToSql
(
Message
::
State
state
)
{
return
messageStateToSql
[
state
].
second
;
}
...
...
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