Remove unnecessary use of std::string.
Change-Id: I479adb087dcaf70bb4eab87840e42fc8998b8d7f
diff --git a/src/base/mutex.h b/src/base/mutex.h
index 48c8585..a3efd5c 100644
--- a/src/base/mutex.h
+++ b/src/base/mutex.h
@@ -58,7 +58,7 @@
// Base class for all Mutex implementations
class BaseMutex {
public:
- const std::string& GetName() const {
+ const char* GetName() const {
return name_;
}
@@ -84,7 +84,7 @@
void DumpContention(std::ostream& os) const;
const LockLevel level_; // Support for lock hierarchy.
- const std::string name_;
+ const char* const name_;
#if CONTENTION_LOGGING
// A log entry that records contention but makes no guarantee that either tid will be held live.
struct ContentionLogEntry {