diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-08 07:39:08 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-08 07:39:08 +0000 |
commit | 9c7132e60db51286c7499a8194c5b85a5762019b (patch) | |
tree | 90d75d97da13e5fc9c8b03f3efee8c708e008661 /base/logging.cc | |
parent | 257493d2371e714358e1294ec390fda22a1b77c7 (diff) | |
download | chromium_src-9c7132e60db51286c7499a8194c5b85a5762019b.zip chromium_src-9c7132e60db51286c7499a8194c5b85a5762019b.tar.gz chromium_src-9c7132e60db51286c7499a8194c5b85a5762019b.tar.bz2 |
[Logging] Remove unneeded CheckOpString struct for CHECKs
Using string* directly works.
Made LogMessage delete any passed in string* after it uses it.
Removed suppressions for fixed memory leak.
BUG=57683
TEST=Existing unit tests
Review URL: http://codereview.chromium.org/6413032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74100 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/logging.cc')
-rw-r--r-- | base/logging.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/base/logging.cc b/base/logging.cc index d66f01b..0a808b4 100644 --- a/base/logging.cc +++ b/base/logging.cc @@ -540,17 +540,19 @@ LogMessage::LogMessage(const char* file, int line, LogSeverity severity) Init(file, line); } -LogMessage::LogMessage(const char* file, int line, const CheckOpString& result) +LogMessage::LogMessage(const char* file, int line, std::string* result) : severity_(LOG_FATAL), file_(file), line_(line) { Init(file, line); - stream_ << "Check failed: " << (*result.str_); + stream_ << "Check failed: " << *result; + delete result; } LogMessage::LogMessage(const char* file, int line, LogSeverity severity, - const CheckOpString& result) + std::string* result) : severity_(severity), file_(file), line_(line) { Init(file, line); - stream_ << "Check failed: " << (*result.str_); + stream_ << "Check failed: " << *result; + delete result; } LogMessage::~LogMessage() { |