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

Side by Side Diff: o3d/plugin/idl/bounding_box.idl

Issue 6602049: Pure pedantry: Replace all ".size() == 0" with ".empty()". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 frustum space. 128 frustum space.
129 \return True if the box is in the frustum. 129 \return True if the box is in the frustum.
130 %] 130 %]
131 [const] bool InFrustum(Vectormath::Aos::Matrix4 matrix); 131 [const] bool InFrustum(Vectormath::Aos::Matrix4 matrix);
132 132
133 [verbatim=cpp_glue] %{ 133 [verbatim=cpp_glue] %{
134 void userglue_setter_marshaled( 134 void userglue_setter_marshaled(
135 void* plugin_data, 135 void* plugin_data,
136 o3d::BoundingBox* _this, 136 o3d::BoundingBox* _this,
137 const std::vector<std::vector<float> >& values) { 137 const std::vector<std::vector<float> >& values) {
138 if (values.size() == 0) { 138 if (values.empty()) {
139 *_this = o3d::BoundingBox(); 139 *_this = o3d::BoundingBox();
140 } else if (values.size() != 2) { 140 } else if (values.size() != 2) {
141 o3d::ServiceLocator* service_locator = 141 o3d::ServiceLocator* service_locator =
142 static_cast<glue::_o3d::PluginObject*>( 142 static_cast<glue::_o3d::PluginObject*>(
143 plugin_data)->service_locator(); 143 plugin_data)->service_locator();
144 O3D_ERROR(service_locator) 144 O3D_ERROR(service_locator)
145 << "BoundingBox: expected 2 values, got " << values.size(); 145 << "BoundingBox: expected 2 values, got " << values.size();
146 } else { 146 } else {
147 for (std::vector<float>::size_type i = 0; i < values.size(); ++i) { 147 for (std::vector<float>::size_type i = 0; i < values.size(); ++i) {
148 if (values[i].size() != 3) { 148 if (values[i].size() != 3) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 A Param which stores a BoundingBox. 202 A Param which stores a BoundingBox.
203 %] 203 %]
204 [nocpp, include="core/cross/param.h"] class ParamBoundingBox : Param { 204 [nocpp, include="core/cross/param.h"] class ParamBoundingBox : Param {
205 %[ 205 %[
206 The BoundingBox stored by the Param. 206 The BoundingBox stored by the Param.
207 %] 207 %]
208 [getter, setter] BoundingBox value_; 208 [getter, setter] BoundingBox value_;
209 }; 209 };
210 210
211 } // namespace o3d 211 } // namespace o3d
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698