diff options
author | gspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-23 21:35:54 +0000 |
---|---|---|
committer | gspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-23 21:35:54 +0000 |
commit | 840434d046cbaefb5a70875b7e364523c713c79b (patch) | |
tree | b55362ca094f48705624af7f6812964d1faeda1c /o3d/serializer | |
parent | f17863106dd6715f2c18b6fcccacd5f232f95831 (diff) | |
download | chromium_src-840434d046cbaefb5a70875b7e364523c713c79b.zip chromium_src-840434d046cbaefb5a70875b7e364523c713c79b.tar.gz chromium_src-840434d046cbaefb5a70875b7e364523c713c79b.tar.bz2 |
These are code changes required to make the GYP build work.
Mostly these are fixes to warnings (signed/unsigned mismatches
were the most common), and some changes to include paths.
I've updated the build.scons files and DEPS file to match these
changes so that the scons build will still function with these
changes.
Review URL: http://codereview.chromium.org/146047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19062 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/serializer')
-rw-r--r-- | o3d/serializer/cross/serializer.cc | 2 | ||||
-rw-r--r-- | o3d/serializer/cross/serializer_binary.cc | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/o3d/serializer/cross/serializer.cc b/o3d/serializer/cross/serializer.cc index f9266af..066ce30 100644 --- a/o3d/serializer/cross/serializer.cc +++ b/o3d/serializer/cross/serializer.cc @@ -756,7 +756,7 @@ void Serializer::SerializePack(Pack* pack) { void Serializer::SerializePackBinary(Pack* pack) { std::vector<ObjectBase*> objects = pack->GetByClass<ObjectBase>(); - for (int i = 0; i < objects.size(); ++i) { + for (std::vector<ObjectBase*>::size_type i = 0; i < objects.size(); ++i) { binary_visitor_->Accept(objects[i]); } } diff --git a/o3d/serializer/cross/serializer_binary.cc b/o3d/serializer/cross/serializer_binary.cc index 9b7f523..56793c4 100644 --- a/o3d/serializer/cross/serializer_binary.cc +++ b/o3d/serializer/cross/serializer_binary.cc @@ -80,7 +80,7 @@ void SerializeBuffer(const Buffer &buffer, MemoryBuffer<uint8> *output) { stream.WriteLittleEndianInt32(static_cast<int32>(num_fields)); // Write out the specification for the fields - for (int i = 0; i < num_fields; ++i) { + for (size_t i = 0; i < num_fields; ++i) { const Field &field = *buffer.fields()[i]; // Determine the FIELDID code we need to write out @@ -110,7 +110,7 @@ void SerializeBuffer(const Buffer &buffer, MemoryBuffer<uint8> *output) { // Write out the data for each field // Write out the specification for the fields - for (int i = 0; i < num_fields; ++i) { + for (size_t i = 0; i < num_fields; ++i) { const Field &field = *buffer.fields()[i]; MemoryBuffer<uint8> field_data(field.size() * num_elements); @@ -127,7 +127,7 @@ void SerializeBuffer(const Buffer &buffer, MemoryBuffer<uint8> *output) { field.num_components(), num_elements); // Write out as little endian float32 - for (int i = 0; i < nitems; ++i) { + for (size_t i = 0; i < nitems; ++i) { stream.WriteLittleEndianFloat32(float_destination[i]); } } else if (field.IsA(UInt32Field::GetApparentClass())) { @@ -138,7 +138,7 @@ void SerializeBuffer(const Buffer &buffer, MemoryBuffer<uint8> *output) { field.num_components(), num_elements); // Write out as little endian int32 - for (int i = 0; i < nitems; ++i) { + for (size_t i = 0; i < nitems; ++i) { stream.WriteLittleEndianInt32(int_destination[i]); } } else if (field.IsA(UByteNField::GetApparentClass())) { @@ -186,7 +186,7 @@ void SerializeCurve(const Curve &curve, MemoryBuffer<uint8> *output) { stream.WriteLittleEndianInt32(1); - for (int i = 0; i < num_keys; ++i) { + for (size_t i = 0; i < num_keys; ++i) { const CurveKey &key = *curve.GetKey(i); // determine the KeyType based on the key's class @@ -227,7 +227,7 @@ void SerializeSkin(const Skin &skin, MemoryBuffer<uint8> *output) { // Count up total number of individual influences size_t total_influence_count = 0; - for (int i = 0; i < influences_array_size; ++i) { + for (size_t i = 0; i < influences_array_size; ++i) { total_influence_count += influences_array[i].size(); } @@ -248,14 +248,14 @@ void SerializeSkin(const Skin &skin, MemoryBuffer<uint8> *output) { // write out version stream.WriteLittleEndianInt32(1); - for (int i = 0; i < influences_array_size; ++i) { + for (size_t i = 0; i < influences_array_size; ++i) { const Skin::Influences &influences = influences_array[i]; // Write the influence count for this Influences object size_t influence_count = influences.size(); stream.WriteLittleEndianInt32(static_cast<int32>(influence_count)); - for (int j = 0; j < influence_count; ++j) { + for (size_t j = 0; j < influence_count; ++j) { const Skin::Influence &influence = influences[j]; stream.WriteLittleEndianInt32(influence.matrix_index); stream.WriteLittleEndianFloat32(influence.weight); |