This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][libstdc++-v3 parallel mode] Make settings getter return non-const object


This patch makes the getter method for the parallel mode settings structure return a non-const object, so it can be directly modified, which is much more convenient for the library user.
AFAIK this does not change library binary compatibility, does it?


Tested x86_64-unknown-linux-gnu: No regressions

Please comment and/or approve.

2007-03-19 Johannes Singler <singler@ira.uka.de>

        * src/parallel_settings.cc: Removed const for getter.
        * include/parallel/settings.h: Removed const for getter.

Johannes
Index: src/parallel_settings.cc
===================================================================
--- src/parallel_settings.cc	(revision 133208)
+++ src/parallel_settings.cc	(working copy)
@@ -36,7 +36,7 @@
 
 namespace __gnu_parallel
 {
-  const _Settings&
+  _Settings&
   _Settings::get() throw()
   { return s; }
 
Index: include/parallel/settings.h
===================================================================
--- include/parallel/settings.h	(revision 133208)
+++ include/parallel/settings.h	(working copy)
@@ -271,7 +271,7 @@
     sequence_index_t 		qsb_steals;
 
     /// Get the global settings.
-    static const _Settings&
+    static _Settings&
     get() throw();
 
     /// Set the global settings.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]