diff options
author | jeanluc@chromium.org <jeanluc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-30 22:46:44 +0000 |
---|---|---|
committer | jeanluc@chromium.org <jeanluc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-30 22:46:44 +0000 |
commit | b70386476df8f11fbad872195f48518b20b20b41 (patch) | |
tree | a268e4a159d0ad9fd28afc0deaab18f0cc9d604a | |
parent | 07eb4aae66c697e052a0bb04047d468bc441a22c (diff) | |
download | chromium_src-b70386476df8f11fbad872195f48518b20b20b41.zip chromium_src-b70386476df8f11fbad872195f48518b20b20b41.tar.gz chromium_src-b70386476df8f11fbad872195f48518b20b20b41.tar.bz2 |
Add the include <iterator> or change the usage of back_inserter to avoid compilation errors in Visual Studio 2010. See http://blogs.msdn.com/b/vcblog/archive/2009/05/25/stl-breaking-changes-in-visual-studio-2010-beta-1.aspx for details.
BUG=71134
TEST=Run the related tests.
Review URL: http://codereview.chromium.org/6260024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73118 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/autofill/form_group.cc | 2 | ||||
-rw-r--r-- | chrome/browser/history/in_memory_url_index.cc | 1 | ||||
-rw-r--r-- | chrome/common/net/x509_certificate_model.cc | 2 | ||||
-rw-r--r-- | net/base/net_util.cc | 12 | ||||
-rw-r--r-- | tools/imagediff/image_diff.cc | 2 |
5 files changed, 11 insertions, 8 deletions
diff --git a/chrome/browser/autofill/form_group.cc b/chrome/browser/autofill/form_group.cc index 6c53303..f702a3a 100644 --- a/chrome/browser/autofill/form_group.cc +++ b/chrome/browser/autofill/form_group.cc @@ -6,6 +6,8 @@ #include "chrome/browser/autofill/form_group.h" +#include <iterator> + string16 FormGroup::GetPreviewText(const AutoFillType& type) const { return GetFieldText(type); } diff --git a/chrome/browser/history/in_memory_url_index.cc b/chrome/browser/history/in_memory_url_index.cc index d60f7e2..9d2e925 100644 --- a/chrome/browser/history/in_memory_url_index.cc +++ b/chrome/browser/history/in_memory_url_index.cc @@ -5,6 +5,7 @@ #include "chrome/browser/history/in_memory_url_index.h" #include <algorithm> +#include <iterator> #include <limits> #include "base/i18n/break_iterator.h" diff --git a/chrome/common/net/x509_certificate_model.cc b/chrome/common/net/x509_certificate_model.cc index 076d974..2d4ffd0 100644 --- a/chrome/common/net/x509_certificate_model.cc +++ b/chrome/common/net/x509_certificate_model.cc @@ -16,7 +16,7 @@ std::string ProcessIDN(const std::string& input) { // Convert the ASCII input to a string16 for ICU. string16 input16; input16.reserve(input.length()); - std::copy(input.begin(), input.end(), std::back_inserter(input16)); + input16.insert(input16.end(), input.begin(), input.end()); string16 output16; output16.resize(input.length()); diff --git a/net/base/net_util.cc b/net/base/net_util.cc index 8188c92..b4082ec 100644 --- a/net/base/net_util.cc +++ b/net/base/net_util.cc @@ -896,10 +896,9 @@ std::wstring FormatUrlInternal(const GURL& url, // Copy everything before the username (the scheme and the separators.) // These are ASCII. - std::copy(spec.begin(), + url_string.insert(url_string.end(), spec.begin(), spec.begin() + parsed.CountCharactersBefore(url_parse::Parsed::USERNAME, - true), - std::back_inserter(url_string)); + true)); const wchar_t kHTTP[] = L"http://"; const char kFTP[] = "ftp."; @@ -968,8 +967,9 @@ std::wstring FormatUrlInternal(const GURL& url, if (parsed.port.is_nonempty()) { url_string.push_back(':'); new_parsed->port.begin = url_string.length(); - std::copy(spec.begin() + parsed.port.begin, - spec.begin() + parsed.port.end(), std::back_inserter(url_string)); + url_string.insert(url_string.end(), + spec.begin() + parsed.port.begin, + spec.begin() + parsed.port.end()); new_parsed->port.len = url_string.length() - new_parsed->port.begin; } else { new_parsed->port.reset(); @@ -1191,7 +1191,7 @@ std::wstring IDNToUnicode(const char* host, // Convert the ASCII input to a wide string for ICU. string16 input16; input16.reserve(host_len); - std::copy(host, host + host_len, std::back_inserter(input16)); + input16.insert(input16.end(), host, host + host_len); string16 out16; size_t output_offset = offset_for_adjustment ? diff --git a/tools/imagediff/image_diff.cc b/tools/imagediff/image_diff.cc index 2973987..1dac4a7 100644 --- a/tools/imagediff/image_diff.cc +++ b/tools/imagediff/image_diff.cc @@ -100,7 +100,7 @@ class Image { unsigned char buf[buf_size]; size_t num_read = 0; while ((num_read = fread(buf, 1, buf_size, f)) > 0) { - std::copy(buf, &buf[num_read], std::back_inserter(compressed)); + compressed.insert(compressed.end(), buf, buf + num_read); } file_util::CloseFile(f); |