diff --git a/src/commands/CmdDelete.cpp b/src/commands/CmdDelete.cpp index 5109d383..e75890c0 100644 --- a/src/commands/CmdDelete.cpp +++ b/src/commands/CmdDelete.cpp @@ -56,7 +56,6 @@ int CmdDelete ( if (id > static_cast (tracked.size ())) throw format ("ID '@{1}' does not correspond to any tracking.", id); - // Note: It's okay to subtract a one-based number from a zero-based index. database.deleteInterval (tracked[tracked.size () - id]); if (rules.getBoolean ("verbose")) diff --git a/src/commands/CmdJoin.cpp b/src/commands/CmdJoin.cpp index 68933513..1e788f0d 100644 --- a/src/commands/CmdJoin.cpp +++ b/src/commands/CmdJoin.cpp @@ -58,7 +58,6 @@ int CmdJoin ( if (id > static_cast (tracked.size ())) throw format ("ID '@{1}' does not correspond to any tracking.", id); - // Note: It's okay to subtract a one-based number from a zero-based index. auto first_id = std::max (ids[0], ids[1]); auto second_id = std::min (ids[0], ids[1]); Interval first = tracked[tracked.size () - first_id]; diff --git a/src/commands/CmdLengthen.cpp b/src/commands/CmdLengthen.cpp index 5f46fe64..f07c8af2 100644 --- a/src/commands/CmdLengthen.cpp +++ b/src/commands/CmdLengthen.cpp @@ -65,7 +65,6 @@ int CmdLengthen ( if (id > static_cast (tracked.size ())) throw format ("ID '@{1}' does not correspond to any tracking.", id); - // Note: It's okay to subtract a one-based number from a zero-based index. Interval i = tracked[tracked.size () - id]; if (i.range.is_open ()) throw format ("Cannot lengthen open interval @{1}", id); diff --git a/src/commands/CmdMove.cpp b/src/commands/CmdMove.cpp index b076d2fe..096247cc 100644 --- a/src/commands/CmdMove.cpp +++ b/src/commands/CmdMove.cpp @@ -68,7 +68,6 @@ int CmdMove ( throw format ("ID '@{1}' does not correspond to any tracking.", id); // Move start time. - // Note: It's okay to subtract a one-based number from a zero-based index. Interval i = tracked[tracked.size () - id]; Datetime start (new_start); diff --git a/src/commands/CmdShorten.cpp b/src/commands/CmdShorten.cpp index 6a3ac36d..98f97b70 100644 --- a/src/commands/CmdShorten.cpp +++ b/src/commands/CmdShorten.cpp @@ -65,7 +65,6 @@ int CmdShorten ( if (id > static_cast (tracked.size ())) throw format ("ID '@{1}' does not correspond to any tracking.", id); - // Note: It's okay to subtract a one-based number from a zero-based index. Interval i = tracked[tracked.size () - id]; if (i.range.is_open ()) throw format ("Cannot shorten open interval @{1}", id); diff --git a/src/commands/CmdSplit.cpp b/src/commands/CmdSplit.cpp index 84c2bbcf..c54bd1ab 100644 --- a/src/commands/CmdSplit.cpp +++ b/src/commands/CmdSplit.cpp @@ -58,7 +58,6 @@ int CmdSplit ( if (id > static_cast (tracked.size ())) throw format ("ID '@{1}' does not correspond to any tracking.", id); - // Note: It's okay to subtract a one-based number from a zero-based index. Interval first = tracked[tracked.size () - id]; Interval second = first; diff --git a/src/commands/CmdTag.cpp b/src/commands/CmdTag.cpp index 800330f0..b45052f3 100644 --- a/src/commands/CmdTag.cpp +++ b/src/commands/CmdTag.cpp @@ -63,7 +63,6 @@ int CmdTag ( if (id > static_cast (tracked.size ())) throw format ("ID '@{1}' does not correspond to any tracking.", id); - // Note: It's okay to subtract a one-based number from a zero-based index. Interval i = tracked[tracked.size () - id]; for (auto& tag : tags) diff --git a/src/commands/CmdUntag.cpp b/src/commands/CmdUntag.cpp index ce70df44..c15fc12f 100644 --- a/src/commands/CmdUntag.cpp +++ b/src/commands/CmdUntag.cpp @@ -63,7 +63,6 @@ int CmdUntag ( if (id > static_cast (tracked.size ())) throw format ("ID '@{1}' does not correspond to any tracking.", id); - // Note: It's okay to subtract a one-based number from a zero-based index. Interval i = tracked[tracked.size () - id]; for (auto& tag : tags)