diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-03 22:01:55 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-03 22:01:55 +0000 |
commit | 3cd8a6adfebd0b117d3fdacbc2ef8e5aaaf24c61 (patch) | |
tree | 443d82d568c07a973669a96798d80852c71d17e3 /ui/base | |
parent | 2927bea88c621fb0250aa9df5a4a6a4f7a0636bc (diff) | |
download | chromium_src-3cd8a6adfebd0b117d3fdacbc2ef8e5aaaf24c61.zip chromium_src-3cd8a6adfebd0b117d3fdacbc2ef8e5aaaf24c61.tar.gz chromium_src-3cd8a6adfebd0b117d3fdacbc2ef8e5aaaf24c61.tar.bz2 |
Update CrOS to use scoped_refptr<T>::get() rather than implicit "operator T*"
Fixes a number of cases either not caught by the automated tool or that
have recently regressed.
BUG=110610
TBR=darin
Review URL: https://codereview.chromium.org/18308004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210048 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base')
-rw-r--r-- | ui/base/x/selection_utils.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/base/x/selection_utils.cc b/ui/base/x/selection_utils.cc index 560f494..4696b00 100644 --- a/ui/base/x/selection_utils.cc +++ b/ui/base/x/selection_utils.cc @@ -67,7 +67,7 @@ void AddString16ToVector(const string16& str, std::string RefCountedMemoryToString( const scoped_refptr<base::RefCountedMemory>& memory) { - if (!memory) { + if (!memory.get()) { NOTREACHED(); return std::string(); } @@ -82,7 +82,7 @@ std::string RefCountedMemoryToString( string16 RefCountedMemoryToString16( const scoped_refptr<base::RefCountedMemory>& memory) { - if (!memory) { + if (!memory.get()) { NOTREACHED(); return string16(); } @@ -168,11 +168,11 @@ bool SelectionData::IsValid() const { } const unsigned char* SelectionData::GetData() const { - return memory_ ? memory_->front() : NULL; + return memory_.get() ? memory_->front() : NULL; } size_t SelectionData::GetSize() const { - return memory_ ? memory_->size() : 0; + return memory_.get() ? memory_->size() : 0; } std::string SelectionData::GetText() const { |