]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Mark some functions as const. 3729/head
authorDavid Wells <wellsd2@rpi.edu>
Tue, 3 Jan 2017 17:07:02 +0000 (12:07 -0500)
committerDavid Wells <wellsd2@rpi.edu>
Wed, 4 Jan 2017 00:54:48 +0000 (19:54 -0500)
This was caught by cppcheck.

include/deal.II/base/thread_management.h

index 75952bfe593ce49f2ae7aaa110c62be63ebeac00..e4da36c37bd2880678d9dede286b11a33038cfd2 100644 (file)
@@ -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;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.