Commit 02e1935c authored by Ronan's avatar Ronan
Browse files

feat(core): use static on inline funcs

parent 89745baa
......@@ -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,
......
......@@ -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;
}
......
Markdown is supported
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