Issue Details (XML | Word | Printable)

Key: STDCXX-1016
Type: Improvement Improvement
Status: Open Open
Priority: Trivial Trivial
Assignee: Farid Zaripov
Reporter: Farid Zaripov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

__rw::__rw_mutex __rw::__rw_locale::_C_mutex member currentry is not used

Created: 17/Sep/08 01:17 PM   Updated: 17/Sep/08 01:17 PM
Return to search
Component/s: 22. Localization
Affects Version/s: 4.1.3, 4.1.4, 4.2.0, 4.2.1
Fix Version/s: 4.2.2

Time Tracking:
Original Estimate: 1h
Original Estimate - 1h
Remaining Estimate: 1h
Remaining Estimate - 1h
Time Spent: Not Specified
Remaining Estimate - 1h

Environment: All

Patch Info: Patch Available
Severity: Inefficiency


 Description  « Hide
Currently the _C_mutex data member of the _rw::_rw_locale class is mentioned only in _C_add_ref () and _C_remove_ref () methods of this class. But neither _C_add_ref () nor _C_remove_ref () are not invoked from anywhere.

The proposed patch:

Index: src/locale_body.h
===================================================================
--- src/locale_body.h	(revision 695985)
+++ src/locale_body.h	(working copy)
@@ -91,8 +91,6 @@
     // (i.e., one with the same id) in the locale object
     _RWSTD_SIZE_T _C_byname_facet_bits;
 
-    __rw_mutex    _C_mutex;
-
     friend struct _STD::locale;
 
 public:
@@ -165,14 +163,6 @@
         return _RWSTD_ATOMIC_PREDECREMENT (__facet._C_ref, false);
     }
 
-    _RWSTD_SIZE_T _C_add_ref () {
-        return _RWSTD_ATOMIC_PREINCREMENT (_C_ref, _C_mutex);
-    }
-
-    _RWSTD_SIZE_T _C_remove_ref () {
-        return _RWSTD_ATOMIC_PREDECREMENT (_C_ref, _C_mutex);
-    }
-
     // access private facet name
     static const char* _C_get_cat_name (const __rw_facet &__facet) {
         return __facet._C_name;


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no entries against this issue.