Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: core/cross/shape.cc

Issue 159168: This fixes a number of things that are warnings in the Mac compiler.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 ElementArray elements; 71 ElementArray elements;
72 elements.reserve(elements_.size()); 72 elements.reserve(elements_.size());
73 std::copy(elements_.begin(), 73 std::copy(elements_.begin(),
74 elements_.end(), 74 elements_.end(),
75 std::back_inserter(elements)); 75 std::back_inserter(elements));
76 return elements; 76 return elements;
77 } 77 }
78 78
79 void Shape::SetElements(const ElementArray& elements) { 79 void Shape::SetElements(const ElementArray& elements) {
80 elements_.resize(elements.size()); 80 elements_.resize(elements.size());
81 for (int i = 0; i != elements.size(); ++i) { 81 for (unsigned int i = 0; i != elements.size(); ++i) {
82 elements_[i] = Element::Ref(elements[i]); 82 elements_[i] = Element::Ref(elements[i]);
83 } 83 }
84 } 84 }
85 85
86 namespace { 86 namespace {
87 class FindByMaterial { 87 class FindByMaterial {
88 public: 88 public:
89 explicit FindByMaterial(Material* material) : material_(material) { } 89 explicit FindByMaterial(Material* material) : material_(material) { }
90 90
91 bool operator() (const DrawElement* draw_element) { 91 bool operator() (const DrawElement* draw_element) {
(...skipping 11 matching lines...) Expand all
103 const DrawElementRefArray& draw_elements = element->GetDrawElementRefs(); 103 const DrawElementRefArray& draw_elements = element->GetDrawElementRefs();
104 if (std::find_if(draw_elements.begin(), 104 if (std::find_if(draw_elements.begin(),
105 draw_elements.end(), 105 draw_elements.end(),
106 FindByMaterial(material)) == draw_elements.end()) { 106 FindByMaterial(material)) == draw_elements.end()) {
107 elements_[pp]->CreateDrawElement(pack, material); 107 elements_[pp]->CreateDrawElement(pack, material);
108 } 108 }
109 } 109 }
110 } 110 }
111 111
112 } // namespace o3d 112 } // namespace o3d
OLDNEW
« core/cross/bitmap_dds.cc ('K') | « core/cross/renderer.cc ('k') | core/cross/skin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698