mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
feat(MainDb): add const qualifier on some parameters
This commit is contained in:
parent
144790b41f
commit
4f40f34a16
4 changed files with 7 additions and 7 deletions
|
|
@ -1269,8 +1269,8 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
|||
return false;
|
||||
}
|
||||
|
||||
bool MainDb::deleteEvent (const shared_ptr<EventLog> &eventLog) {
|
||||
EventLogPrivate *dEventLog = eventLog->getPrivate();
|
||||
bool MainDb::deleteEvent (const shared_ptr<const EventLog> &eventLog) {
|
||||
const EventLogPrivate *dEventLog = eventLog->getPrivate();
|
||||
if (!dEventLog->dbKey.isValid()) {
|
||||
lWarning() << "Unable to delete invalid event.";
|
||||
return false;
|
||||
|
|
@ -1294,7 +1294,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
|||
dEventLog->dbKey = MainDbEventKey();
|
||||
|
||||
if (eventLog->getType() == EventLog::Type::ConferenceChatMessage)
|
||||
static_pointer_cast<ConferenceChatMessageEvent>(
|
||||
static_pointer_cast<const ConferenceChatMessageEvent>(
|
||||
eventLog
|
||||
)->getChatMessage()->getPrivate()->dbKey = MainDbChatMessageKey();
|
||||
|
||||
|
|
@ -2144,7 +2144,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
|||
return false;
|
||||
}
|
||||
|
||||
bool MainDb::deleteEvent (const shared_ptr<EventLog> &) {
|
||||
bool MainDb::deleteEvent (const shared_ptr<const EventLog> &) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public:
|
|||
|
||||
bool addEvent (const std::shared_ptr<EventLog> &eventLog);
|
||||
bool updateEvent (const std::shared_ptr<EventLog> &eventLog);
|
||||
static bool deleteEvent (const std::shared_ptr<EventLog> &eventLog);
|
||||
static bool deleteEvent (const std::shared_ptr<const EventLog> &eventLog);
|
||||
int getEventsCount (FilterMask mask = NoFilter) const;
|
||||
|
||||
static std::shared_ptr<EventLog> getEventFromKey (const MainDbKey &dbKey);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ time_t EventLog::getCreationTime () const {
|
|||
return d->creationTime;
|
||||
}
|
||||
|
||||
void EventLog::deleteFromDatabase (const shared_ptr<EventLog> &eventLog) {
|
||||
void EventLog::deleteFromDatabase (const shared_ptr<const EventLog> &eventLog) {
|
||||
MainDb::deleteEvent(eventLog);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public:
|
|||
Type getType () const;
|
||||
time_t getCreationTime () const;
|
||||
|
||||
static void deleteFromDatabase (const std::shared_ptr<EventLog> &eventLog);
|
||||
static void deleteFromDatabase (const std::shared_ptr<const EventLog> &eventLog);
|
||||
|
||||
protected:
|
||||
EventLog (EventLogPrivate &p, Type type, time_t creationTime);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue