[gnote] Remove FOREACH from syncmanager
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Remove FOREACH from syncmanager
- Date: Sun, 7 Apr 2019 16:43:56 +0000 (UTC)
commit dfa87378d6e655d6b18f3ac8b780931638df4118
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun Apr 7 18:28:41 2019 +0300
Remove FOREACH from syncmanager
src/synchronization/syncmanager.cpp | 6 +++---
src/synchronization/syncmanager.hpp | 3 +--
2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/synchronization/syncmanager.cpp b/src/synchronization/syncmanager.cpp
index e092dc04..f390df93 100644
--- a/src/synchronization/syncmanager.cpp
+++ b/src/synchronization/syncmanager.cpp
@@ -293,7 +293,7 @@ namespace sync {
// Look through all the notes modified on the client
// and upload new or modified ones to the server
std::list<Note::Ptr> newOrModifiedNotes;
- FOREACH(const NoteBase::Ptr & iter, note_mgr().get_notes()) {
+ for(const NoteBase::Ptr & iter : note_mgr().get_notes()) {
Note::Ptr note = static_pointer_cast<Note>(iter);
if(m_client->get_revision(note) == -1) {
// This is a new note that has never been synchronized to the server
@@ -487,7 +487,7 @@ namespace sync {
bool server_has_updates = false;
bool client_has_updates = m_client->deleted_note_titles().size() > 0;
if(!client_has_updates) {
- FOREACH(const NoteBase::Ptr & iter, note_mgr().get_notes()) {
+ for(const NoteBase::Ptr & iter : note_mgr().get_notes()) {
Note::Ptr note = static_pointer_cast<Note>(iter);
if(m_client->get_revision(note) == -1 || note->metadata_change_date() >
m_client->last_sync_date()) {
client_has_updates = true;
@@ -694,7 +694,7 @@ namespace sync {
auto serverNotes = server->get_all_note_uuids();
// Delete notes locally that have been deleted on the server
- FOREACH(const NoteBase::Ptr & iter, localNotes) {
+ for(const NoteBase::Ptr & iter : localNotes) {
Note::Ptr note = static_pointer_cast<Note>(iter);
if(SyncManager::_obj().m_client->get_revision(note) != -1
&& std::find(serverNotes.begin(), serverNotes.end(), note->id()) == serverNotes.end()) {
diff --git a/src/synchronization/syncmanager.hpp b/src/synchronization/syncmanager.hpp
index da0fdcfa..9cdce2dd 100644
--- a/src/synchronization/syncmanager.hpp
+++ b/src/synchronization/syncmanager.hpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2012-2014,2017-2018 Aurimas Cernius
+ * Copyright (C) 2012-2014,2017-2019 Aurimas Cernius
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -27,7 +27,6 @@
#include <glibmm/main.h>
#include <glibmm/thread.h>
-#include "base/macros.hpp"
#include "isyncmanager.hpp"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]