diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-04 01:20:48 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-04 01:20:48 +0000 |
commit | 683e6d9485428c786b438120a89ff64e12d0e04e (patch) | |
tree | 60ee9c3d952125c7cc85a822c8c65f9809631f7c /rlz | |
parent | b5e17c9de9881d77386bb1b4cd62c05d7cbf5bc5 (diff) | |
download | chromium_src-683e6d9485428c786b438120a89ff64e12d0e04e.zip chromium_src-683e6d9485428c786b438120a89ff64e12d0e04e.tar.gz chromium_src-683e6d9485428c786b438120a89ff64e12d0e04e.tar.bz2 |
rlz: Do not take the address of a temporary.
Fixes this warning:
taking the address of a temporary object of type 'base::win::RegKey' [-Waddress-of-temporary]
(I think the code is fine in this case, but it's a useful warning and we
want to be able to build with -Werror.)
BUG=82385
Review URL: https://codereview.chromium.org/369923004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281349 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'rlz')
-rw-r--r-- | rlz/test/rlz_test_helpers.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/rlz/test/rlz_test_helpers.cc b/rlz/test/rlz_test_helpers.cc index d8b999f..8571bda 100644 --- a/rlz/test/rlz_test_helpers.cc +++ b/rlz/test/rlz_test_helpers.cc @@ -81,9 +81,8 @@ void WriteRegistryTree(const RegistryKeyData& data, base::win::RegKey* dest) { for (std::map<base::string16, RegistryKeyData>::const_iterator iter = data.keys.begin(); iter != data.keys.end(); ++iter) { - WriteRegistryTree(iter->second, - &base::win::RegKey(dest->Handle(), iter->first.c_str(), - KEY_ALL_ACCESS)); + base::win::RegKey key(dest->Handle(), iter->first.c_str(), KEY_ALL_ACCESS); + WriteRegistryTree(iter->second, &key); } } @@ -116,9 +115,9 @@ void InitializeRegistryOverridesForTesting( override_manager->OverrideRegistry(HKEY_CURRENT_USER, L"rlz_temp_hkcu"); if (do_copy) { - WriteRegistryTree(data, &base::win::RegKey(HKEY_LOCAL_MACHINE, - kHKLMAccessProviders, - KEY_ALL_ACCESS)); + base::win::RegKey key( + HKEY_LOCAL_MACHINE, kHKLMAccessProviders, KEY_ALL_ACCESS); + WriteRegistryTree(data, &key); } } |