summaryrefslogtreecommitdiffstats
path: root/base/values.cc
diff options
context:
space:
mode:
authormmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-06 15:46:59 +0000
committermmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-06 15:46:59 +0000
commitabb9d0ca091ed62a1ff77efca594932b31dce975 (patch)
tree988fc455824d8870ed3eefc526b42987f20a0901 /base/values.cc
parent294300a62be265e4b17eb9df0ee4ddfd543a1fb4 (diff)
downloadchromium_src-abb9d0ca091ed62a1ff77efca594932b31dce975.zip
chromium_src-abb9d0ca091ed62a1ff77efca594932b31dce975.tar.gz
chromium_src-abb9d0ca091ed62a1ff77efca594932b31dce975.tar.bz2
Portability fix for Value. The MSVC CRT doesn't complain about memcpy_s unless _CRT_SECURE_DEPRECATE_MEMORY is defined (and it isn't); there are no other callers of memcpy_s in base. (And seriously, what's an extra count argument supposed to solve, anyway?) current_entry_type is dropped because it's unused. A virtual destructor is added to ValueSerializer to conform to the style guide and quiet gcc's helpful warning.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@434 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/values.cc')
-rw-r--r--base/values.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/base/values.cc b/base/values.cc
index 1cad628..00082d3 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -196,7 +196,7 @@ BinaryValue* BinaryValue::CreateWithCopiedBuffer(char* buffer, size_t size) {
return NULL;
char* buffer_copy = new char[size];
- memcpy_s(buffer_copy, size, buffer, size);
+ memcpy(buffer_copy, buffer, size);
return new BinaryValue(buffer_copy, size);
}
@@ -277,7 +277,6 @@ bool DictionaryValue::Set(const std::wstring& path, Value* in_value) {
// Assume that we're indexing into a dictionary.
DictionaryValue* entry = NULL;
- ValueType current_entry_type = TYPE_NULL;
if (!HasKey(key) || (dictionary_[key]->GetType() != TYPE_DICTIONARY)) {
entry = new DictionaryValue;
SetInCurrentNode(key, entry);