Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/batch_update_result.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void BatchUpdateResult::ProcessResponseArray(
Poco::Logger &logger = Poco::Logger::get("BatchUpdateResult");
for (std::vector<BatchUpdateResult>::const_iterator it = results->begin();
it != results->end();
it++) {
++it) {
BatchUpdateResult result = *it;

logger.debug(result.String());
Expand Down
36 changes: 18 additions & 18 deletions src/context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ void UIElements::ApplyChanges(
for (std::vector<ModelChange>::const_iterator it =
changes.begin();
it != changes.end();
it++) {
++it) {
ModelChange ch = *it;

if (ch.ModelType() == kModelWorkspace
Expand Down Expand Up @@ -575,7 +575,7 @@ void Context::updateUI(const UIElements &what) {
for (std::vector<std::string>::const_iterator
it = tags.begin();
it != tags.end();
it++) {
++it) {
view::Generic view;
view.Name = *it;
tag_views.push_back(view);
Expand All @@ -589,7 +589,7 @@ void Context::updateUI(const UIElements &what) {
for (std::vector<Workspace *>::const_iterator
it = workspaces.begin();
it != workspaces.end();
it++) {
++it) {
Workspace *ws = *it;
view::Generic view;
view.GUID = ws->GUID();
Expand All @@ -607,7 +607,7 @@ void Context::updateUI(const UIElements &what) {
user_->related.ClientList(&models);
for (std::vector<Client *>::const_iterator it = models.begin();
it != models.end();
it++) {
++it) {
Client *c = *it;
view::Generic view;
view.GUID = c->GUID();
Expand Down Expand Up @@ -810,7 +810,7 @@ void Context::updateUI(const UIElements &what) {
for (std::vector<toggl::AutotrackerRule *>::const_iterator
it = user_->related.AutotrackerRules.begin();
it != user_->related.AutotrackerRules.end();
it++) {
++it) {
AutotrackerRule *model = *it;
Project *p = user_->related.ProjectByID(model->PID());
Task *t = user_->related.TaskByID(model->TID());
Expand Down Expand Up @@ -3637,7 +3637,7 @@ Project *Context::CreateProject(
}
for (std::vector<Project *>::iterator it =
user_->related.Projects.begin();
it != user_->related.Projects.end(); it++) {
it != user_->related.Projects.end(); ++it) {
Project *p = *it;

bool clientIsSame = false;
Expand Down Expand Up @@ -3771,7 +3771,7 @@ Client *Context::CreateClient(
}
for (std::vector<Client *>::iterator it =
user_->related.Clients.begin();
it != user_->related.Clients.end(); it++) {
it != user_->related.Clients.end(); ++it) {
Client *c = *it;
if (c->WID() == workspace_id && c->Name() == trimmed_client_name) {
displayError(kClientNameAlreadyExists);
Expand Down Expand Up @@ -3934,7 +3934,7 @@ error Context::runObmExperiments() {
for (std::vector<ObmExperiment *>::const_iterator it =
user_->related.ObmExperiments.begin();
it != user_->related.ObmExperiments.end();
it++) {
++it) {
ObmExperiment *model = *it;
if (!model->DeletedAt()) {
experiments[model->Nr()] = *model;
Expand All @@ -3951,7 +3951,7 @@ error Context::runObmExperiments() {
for (std::map<Poco::UInt64, ObmExperiment>::const_iterator
it = experiments.begin();
it != experiments.end();
it++) {
++it) {
ObmExperiment experiment = it->second;
UI()->DisplayObmExperiment(
experiment.Nr(),
Expand Down Expand Up @@ -4835,7 +4835,7 @@ error Context::pushClients(
error err = noError;
for (std::vector<Client *>::const_iterator it =
clients.begin();
it != clients.end(); it++) {
it != clients.end(); ++it) {
Json::Value clientJson = (*it)->SaveToJSON();

Json::StyledWriter writer;
Expand Down Expand Up @@ -4879,12 +4879,12 @@ error Context::pushProjects(const std::vector<Project *> &projects,
std::string project_json("");
for (std::vector<Project *>::const_iterator it =
projects.begin();
it != projects.end(); it++) {
it != projects.end(); ++it) {
if (!(*it)->CID() && !(*it)->ClientGUID().empty()) {
// Find client id
for (std::vector<Client *>::const_iterator itc =
clients.begin();
itc != clients.end(); itc++) {
itc != clients.end(); ++itc) {
if ((*itc)->GUID().compare((*it)->ClientGUID()) == 0) {
(*it)->SetCID((*itc)->ID());
break;
Expand Down Expand Up @@ -4931,12 +4931,12 @@ error Context::updateEntryProjects(const std::vector<Project *> &projects,
const std::vector<TimeEntry *> &time_entries) {
for (std::vector<TimeEntry *>::const_iterator it =
time_entries.begin();
it != time_entries.end(); it++) {
it != time_entries.end(); ++it) {
if (!(*it)->PID() && !(*it)->ProjectGUID().empty()) {
// Find project id
for (std::vector<Project *>::const_iterator itc =
projects.begin();
itc != projects.end(); itc++) {
itc != projects.end(); ++itc) {
if ((*itc)->GUID().compare((*it)->ProjectGUID()) == 0) {
(*it)->SetPID((*itc)->ID());
break;
Expand All @@ -4961,7 +4961,7 @@ error Context::pushEntries(

for (std::vector<TimeEntry *>::const_iterator it =
time_entries.begin();
it != time_entries.end(); it++) {
it != time_entries.end(); ++it) {
// Avoid trying to POST when we're offline
if (offline) {
// Mark the time entry as unsynced now
Expand Down Expand Up @@ -5128,7 +5128,7 @@ error Context::pushObmAction() {
for (std::vector<ObmAction *>::iterator it =
user_->related.ObmActions.begin();
it != user_->related.ObmActions.end();
it++) {
++it) {
ObmAction *model = *it;
if (!model->IsMarkedAsDeletedOnServer()) {
for_upload = model;
Expand Down Expand Up @@ -5307,7 +5307,7 @@ error Context::pullWorkspacePreferences(TogglClient* toggl_client) {
for (std::vector<Workspace*>::const_iterator
it = workspaces.begin();
it != workspaces.end();
it++) {
++it) {
Workspace* ws = *it;

if (!ws->Business())
Expand Down Expand Up @@ -5641,7 +5641,7 @@ void Context::collectPushableModels(
for (typename std::vector<T *>::const_iterator it =
list.begin();
it != list.end();
it++) {
++it) {
T *model = *it;
if (!model->NeedsPush()) {
continue;
Expand Down
4 changes: 2 additions & 2 deletions src/formatter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ std::string Formatter::EscapeJSONString(const std::string &input) {
std::ostringstream ss;
for (std::string::const_iterator iter = input.begin();
iter != input.end();
iter++) {
++iter) {
switch (*iter) {
case '"':
ss << "\"";
Expand Down Expand Up @@ -574,7 +574,7 @@ error Formatter::CollectErrors(std::vector<error> * const errors) {
std::set<error> unique;
for (std::vector<error>::const_iterator it = errors->begin();
it != errors->end();
it++) {
++it) {
error err = *it;
if (!err.empty() && err[err.size() - 1] == '\n') {
err[err.size() - 1] = '.';
Expand Down
2 changes: 1 addition & 1 deletion src/gui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ void GUI::DisplayAutotrackerRules(
for (std::vector<view::AutotrackerRule>::const_iterator
it = autotracker_rules.begin();
it != autotracker_rules.end();
it++) {
++it) {
TogglAutotrackerRuleView *item = autotracker_rule_to_view_item(*it);
item->Next = first;
first = item;
Expand Down
2 changes: 1 addition & 1 deletion src/help_article.cc
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ std::vector<HelpArticle> HelpDatabase::GetArticles(
std::vector<HelpArticle> result;
for (std::vector<HelpArticle>::const_iterator it = articles_.begin();
it != articles_.end();
it++) {
++it) {
HelpArticle article = *it;
for (Poco::StringTokenizer::Iterator sit = tokenizer.begin();
sit != tokenizer.end();
Expand Down
36 changes: 18 additions & 18 deletions src/related_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ error RelatedData::DeleteAutotrackerRule(const Poco::Int64 local_id) {
}
for (std::vector<AutotrackerRule *>::iterator it =
AutotrackerRules.begin();
it != AutotrackerRules.end(); it++) {
it != AutotrackerRules.end(); ++it) {
AutotrackerRule *rule = *it;
// Autotracker settings are not saved to DB,
// so the ID will be 0 always. But will have local ID
Expand All @@ -75,7 +75,7 @@ AutotrackerRule *RelatedData::FindAutotrackerRule(
const TimelineEvent &event) const {
for (std::vector<AutotrackerRule *>::const_iterator it =
AutotrackerRules.begin();
it != AutotrackerRules.end(); it++) {
it != AutotrackerRules.end(); ++it) {
AutotrackerRule *rule = *it;
if (rule->Matches(event)) {
return rule;
Expand All @@ -88,7 +88,7 @@ bool RelatedData::HasMatchingAutotrackerRule(
const std::string &lowercase_term) const {
for (std::vector<AutotrackerRule *>::const_iterator it =
AutotrackerRules.begin();
it != AutotrackerRules.end(); it++) {
it != AutotrackerRules.end(); ++it) {
AutotrackerRule *rule = *it;
if (rule->Term() == lowercase_term) {
return true;
Expand All @@ -102,7 +102,7 @@ Poco::Int64 RelatedData::NumberOfUnsyncedTimeEntries() const {

for (std::vector<TimeEntry *>::const_iterator it =
TimeEntries.begin();
it != TimeEntries.end(); it++) {
it != TimeEntries.end(); ++it) {
TimeEntry *te = *it;
if (te->NeedsPush()) {
count++;
Expand Down Expand Up @@ -130,7 +130,7 @@ std::vector<TimeEntry *> RelatedData::VisibleTimeEntries() const {
std::vector<TimeEntry *> result;
for (std::vector<TimeEntry *>::const_iterator it =
TimeEntries.begin();
it != TimeEntries.end(); it++) {
it != TimeEntries.end(); ++it) {
TimeEntry *te = *it;
if (te->GUID().empty()) {
continue;
Expand All @@ -148,7 +148,7 @@ Poco::Int64 RelatedData::TotalDurationForDate(const TimeEntry *match) const {
Poco::Int64 duration(0);
for (std::vector<TimeEntry *>::const_iterator it =
TimeEntries.begin();
it != TimeEntries.end(); it++) {
it != TimeEntries.end(); ++it) {
TimeEntry *te = *it;
if (te->GUID().empty()) {
continue;
Expand All @@ -171,7 +171,7 @@ TimeEntry *RelatedData::LatestTimeEntry() const {
// Find the time entry that was stopped most recently
for (std::vector<TimeEntry *>::const_iterator it =
TimeEntries.begin();
it != TimeEntries.end(); it++) {
it != TimeEntries.end(); ++it) {
TimeEntry *te = *it;

if (te->GUID().empty()) {
Expand Down Expand Up @@ -210,7 +210,7 @@ void RelatedData::timeEntryAutocompleteItems(

for (std::vector<TimeEntry *>::const_iterator it =
TimeEntries.begin();
it != TimeEntries.end(); it++) {
it != TimeEntries.end(); ++it) {
TimeEntry *te = *it;

if (te->DeletedAt() || te->IsMarkedAsDeletedOnServer()
Expand Down Expand Up @@ -302,7 +302,7 @@ void RelatedData::taskAutocompleteItems(

for (std::vector<Task *>::const_iterator it =
Tasks.begin();
it != Tasks.end(); it++) {
it != Tasks.end(); ++it) {
Task *t = *it;

if (t == nullptr) {
Expand Down Expand Up @@ -380,7 +380,7 @@ void RelatedData::projectAutocompleteItems(

for (std::vector<Project *>::const_iterator it =
Projects.begin();
it != Projects.end(); it++) {
it != Projects.end(); ++it) {
Project *p = *it;

if (!p->Active()) {
Expand Down Expand Up @@ -426,7 +426,7 @@ void RelatedData::projectAutocompleteItems(
if (task_items) {
for (std::vector<view::Autocomplete>::const_iterator it =
(*task_items)[autocomplete_item.ProjectID].begin();
it != (*task_items)[autocomplete_item.ProjectID].end(); it++) {
it != (*task_items)[autocomplete_item.ProjectID].end(); ++it) {
view::Autocomplete ac = *it;
(*items)[autocomplete_item.WorkspaceName].push_back(ac);
}
Expand All @@ -436,7 +436,7 @@ void RelatedData::projectAutocompleteItems(
if (task_items) {
for (std::vector<view::Autocomplete>::const_iterator it =
(*task_items)[autocomplete_item.ProjectID].begin();
it != (*task_items)[autocomplete_item.ProjectID].end(); it++) {
it != (*task_items)[autocomplete_item.ProjectID].end(); ++it) {
view::Autocomplete ac = *it;
list->push_back(ac);
}
Expand Down Expand Up @@ -510,7 +510,7 @@ void RelatedData::workspaceAutocompleteItems(
std::set<Poco::UInt64> ws_ids_with_projects;
for (std::vector<Project *>::const_iterator it =
Projects.begin();
it != Projects.end(); it++) {
it != Projects.end(); ++it) {
Project *p = *it;

if (p->Active()) {
Expand All @@ -520,7 +520,7 @@ void RelatedData::workspaceAutocompleteItems(

for (std::vector<Workspace *>::const_iterator it =
Workspaces.begin();
it != Workspaces.end(); it++) {
it != Workspaces.end(); ++it) {
Workspace *ws = *it;

if (ws_ids_with_projects.find(ws->ID()) == ws_ids_with_projects.end()) {
Expand All @@ -543,7 +543,7 @@ void RelatedData::TagList(
for (std::vector<Tag *>::const_iterator it =
Tags.begin();
it != Tags.end();
it++) {
++it) {
Tag *tag = *it;
if (wid && tag->WID() != wid) {
continue;
Expand All @@ -565,7 +565,7 @@ void RelatedData::WorkspaceList(std::vector<Workspace *> *result) const {
for (std::vector<Workspace *>::const_iterator it =
Workspaces.begin();
it != Workspaces.end();
it++) {
++it) {
Workspace *ws = *it;
if (!ws->Admin() && ws->OnlyAdminsMayCreateProjects()) {
continue;
Expand Down Expand Up @@ -692,7 +692,7 @@ T *modelByGUID(const guid GUID, std::vector<T *> const *list) {
return nullptr;
}
typedef typename std::vector<T *>::const_iterator iterator;
for (iterator it = list->begin(); it != list->end(); it++) {
for (iterator it = list->begin(); it != list->end(); ++it) {
T *model = *it;
if (model->GUID() == GUID) {
return model;
Expand All @@ -707,7 +707,7 @@ T *modelByID(const Poco::UInt64 id, std::vector<T *> const *list) {
return nullptr;
}
typedef typename std::vector<T *>::const_iterator iterator;
for (iterator it = list->begin(); it != list->end(); it++) {
for (iterator it = list->begin(); it != list->end(); ++it) {
T *model = *it;
if (model->ID() == id) {
return model;
Expand Down
2 changes: 1 addition & 1 deletion src/time_entry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ Json::Value TimeEntry::SaveToJSON() const {
if (TagNames.size() > 0) {
for (std::vector<std::string>::const_iterator it = TagNames.begin();
it != TagNames.end();
it++) {
++it) {
std::string tag_name = Formatter::EscapeJSONString(*it);
tag_nodes.append(Json::Value(tag_name));
}
Expand Down
Loading