Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2904)

Unified Diff: base/tracked.h

Issue 3012001: Move implementation from header to source. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: blank line Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« base/task.h ('K') | « base/task.cc ('k') | base/tracked.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/tracked.h
diff --git a/base/tracked.h b/base/tracked.h
index 3622d1ca9e1bda65a3eb0819b245851b1d9c3841..10fe99d6fa7d2b24b75f646578e4c6384bd38aed 100644
--- a/base/tracked.h
+++ b/base/tracked.h
@@ -39,16 +39,10 @@ class Location {
// Constructor should be called with a long-lived char*, such as __FILE__.
// It assumes the provided value will persist as a global constant, and it
// will not make a copy of it.
- Location(const char* function_name, const char* file_name, int line_number)
- : function_name_(function_name),
- file_name_(file_name),
- line_number_(line_number) { }
+ Location(const char* function_name, const char* file_name, int line_number);
// Provide a default constructor for easy of debugging.
- Location()
- : function_name_("Unknown"),
- file_name_("Unknown"),
- line_number_(-1) { }
+ Location();
// Comparison operator for insertion into a std::map<> hash tables.
// All we need is *some* (any) hashing distinction. Strings should already
@@ -56,13 +50,7 @@ class Location {
// Use line number as the primary key (because it is fast, and usually gets us
// a difference), and then pointers as secondary keys (just to get some
// distinctions).
- bool operator < (const Location& other) const {
- if (line_number_ != other.line_number_)
- return line_number_ < other.line_number_;
- if (file_name_ != other.file_name_)
- return file_name_ < other.file_name_;
- return function_name_ < other.function_name_;
- }
+ bool operator < (const Location& other) const;
Evan Martin 2010/07/15 17:37:33 Comparators being inlined might be important for p
Elliot Glaysher 2010/07/15 18:08:10 I've undone this one. I saw strings and I thought
const char* function_name() const { return function_name_; }
const char* file_name() const { return file_name_; }
« base/task.h ('K') | « base/task.cc ('k') | base/tracked.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698