mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
fix(core): add many workarounds to build on Windows...
This commit is contained in:
parent
a225f7cf3a
commit
954a1a9cd5
4 changed files with 11 additions and 13 deletions
|
|
@ -204,13 +204,11 @@ int Imdn::timerExpired (void *data, unsigned int revents) {
|
|||
|
||||
bool Imdn::aggregationEnabled () const {
|
||||
auto config = linphone_core_get_config(chatRoom->getCore()->getCCore());
|
||||
bool aggregateImdn = linphone_config_get_bool(config, "misc", "aggregate_imdn", TRUE);
|
||||
return (chatRoom->canHandleCpim() && aggregateImdn);
|
||||
return (chatRoom->canHandleCpim() && linphone_config_get_bool(config, "misc", "aggregate_imdn", TRUE));
|
||||
}
|
||||
|
||||
void Imdn::send () {
|
||||
bool networkReachable = linphone_core_is_network_reachable(chatRoom->getCore()->getCCore());
|
||||
if (!networkReachable)
|
||||
if (!linphone_core_is_network_reachable(chatRoom->getCore()->getCCore()))
|
||||
return;
|
||||
|
||||
if (!deliveredMessages.empty() || !displayedMessages.empty()) {
|
||||
|
|
|
|||
|
|
@ -619,7 +619,7 @@ shared_ptr<EventLog> MainDbPrivate::selectConferenceChatMessageEvent (
|
|||
chatRoom,
|
||||
ChatMessage::Direction(row.get<int>(8))
|
||||
));
|
||||
chatMessage->setIsSecured(bool(row.get<int>(9)));
|
||||
chatMessage->setIsSecured(!!row.get<int>(9));
|
||||
|
||||
ChatMessagePrivate *dChatMessage = chatMessage->getPrivate();
|
||||
ChatMessage::State messageState = ChatMessage::State(row.get<int>(7));
|
||||
|
|
@ -633,8 +633,8 @@ shared_ptr<EventLog> MainDbPrivate::selectConferenceChatMessageEvent (
|
|||
|
||||
dChatMessage->setTime(MainDbPrivate::getTmAsTimeT(row.get<tm>(5)));
|
||||
dChatMessage->setImdnMessageId(row.get<string>(6));
|
||||
dChatMessage->setPositiveDeliveryNotificationRequired(bool(row.get<int>(14)));
|
||||
dChatMessage->setDisplayNotificationRequired(bool(row.get<int>(15)));
|
||||
dChatMessage->setPositiveDeliveryNotificationRequired(!!row.get<int>(14));
|
||||
dChatMessage->setDisplayNotificationRequired(!!row.get<int>(15));
|
||||
|
||||
dChatMessage->markContentsAsNotLoaded();
|
||||
dChatMessage->setIsReadOnly(true);
|
||||
|
|
@ -1084,7 +1084,7 @@ void MainDbPrivate::updateSchema () {
|
|||
|
||||
static inline bool checkLegacyTableExists (soci::session &session, const string &name) {
|
||||
session << "SELECT name FROM sqlite_master WHERE type='table' AND name = :name", soci::use(name);
|
||||
return session.got_data() > 0;
|
||||
return session.got_data();
|
||||
}
|
||||
|
||||
static inline bool checkLegacyFriendsTableExists (soci::session &session) {
|
||||
|
|
|
|||
|
|
@ -225,10 +225,10 @@ bool DbSession::checkTableExists (const string &table) const {
|
|||
switch (d->backend) {
|
||||
case DbSessionPrivate::Backend::Mysql:
|
||||
*session << "SHOW TABLES LIKE :table", soci::use(table);
|
||||
return session->got_data() > 0;
|
||||
return session->got_data();
|
||||
case DbSessionPrivate::Backend::Sqlite3:
|
||||
*session << "SELECT name FROM sqlite_master WHERE type='table' AND name=:table", soci::use(table);
|
||||
return session->got_data() > 0;
|
||||
return session->got_data();
|
||||
case DbSessionPrivate::Backend::None:
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -370,13 +370,13 @@ static inline bool getValueAsBool (const VariantPrivate &p, bool *soFarSoGood) {
|
|||
case Variant::Char:
|
||||
case Variant::Double:
|
||||
case Variant::Float:
|
||||
return static_cast<bool>(getAssumedNumber(p));
|
||||
return!!getAssumedNumber(p);
|
||||
|
||||
case Variant::UnsignedInt:
|
||||
case Variant::UnsignedShort:
|
||||
case Variant::UnsignedLong:
|
||||
case Variant::UnsignedLongLong:
|
||||
return static_cast<bool>(getAssumedUnsignedNumber(p));
|
||||
return !!getAssumedUnsignedNumber(p);
|
||||
|
||||
case Variant::Bool:
|
||||
return p.value.b;
|
||||
|
|
@ -385,7 +385,7 @@ static inline bool getValueAsBool (const VariantPrivate &p, bool *soFarSoGood) {
|
|||
return Utils::stob(*p.value.str);
|
||||
|
||||
case Variant::Generic:
|
||||
return static_cast<bool>(p.value.g);
|
||||
return !!p.value.g;
|
||||
|
||||
default:
|
||||
*soFarSoGood = false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue