From: David Wells Date: Tue, 3 Jan 2017 17:07:02 +0000 (-0500) Subject: Mark some functions as const. X-Git-Tag: v8.5.0-rc1~295^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd3f192934b9b39a958f55afaf1be9bbb7ecc440;p=dealii.git Mark some functions as const. This was caught by cppcheck. --- diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index 75952bfe59..e4da36c37b 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -1270,7 +1270,7 @@ namespace Threads * an implicit pointer to an object that exists exactly once for each * thread, the check is simply to compare these pointers. */ - bool operator == (const Thread &t) + bool operator == (const Thread &t) const { return thread_descriptor == t.thread_descriptor; } @@ -3155,7 +3155,7 @@ namespace Threads * an implicit pointer to an object that exists exactly once for each * task, the check is simply to compare these pointers. */ - bool operator == (const Task &t) + bool operator == (const Task &t) const { AssertThrow (joinable(), ExcNoTask()); return task_descriptor == t.task_descriptor;