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

Unified Diff: gpu/command_buffer/common/gles2_cmd_utils.cc

Issue 2070283002: Use container::back() and container::pop_back(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/client/program_info_manager.cc ('k') | gpu/command_buffer/service/program_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/gles2_cmd_utils.cc
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index 871439725e37366380993fcf3ab10972121f1725..b68bb0b0ca830bef7b52ce73f69e077b980c0377 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -5,14 +5,16 @@
// This file is here so other GLES2 related files can have a common set of
// includes where appropriate.
-#include <sstream>
+#include "gpu/command_buffer/common/gles2_cmd_utils.h"
+
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <GLES2/gl2extchromium.h>
#include <GLES3/gl3.h>
+#include <sstream>
+
#include "base/numerics/safe_math.h"
-#include "gpu/command_buffer/common/gles2_cmd_utils.h"
namespace gpu {
namespace gles2 {
@@ -27,7 +29,7 @@ enum GLErrorBit {
kInvalidFrameBufferOperation = (1 << 4),
kContextLost = (1 << 5)
};
-}
+} // namespace gl_error_bit
int GLES2Util::GLGetNumValuesReturned(int id) const {
switch (id) {
@@ -1454,10 +1456,9 @@ uint32_t GLES2Util::GetChannelsNeededForAttachmentType(
std::string GLES2Util::GetStringEnum(uint32_t value) {
const EnumToString* entry = enum_to_string_table_;
const EnumToString* end = entry + enum_to_string_table_len_;
- for (;entry < end; ++entry) {
- if (value == entry->value) {
+ for (; entry < end; ++entry) {
+ if (value == entry->value)
return entry->name;
- }
}
std::stringstream ss;
ss.fill('0');
@@ -1492,7 +1493,7 @@ std::string GLES2Util::GetQualifiedEnumString(const EnumToString* table,
GLSLArrayName::GLSLArrayName(const std::string& name) : element_index_(-1) {
if (name.size() < 4)
return;
- if (name[name.size() - 1] != ']')
+ if (name.back() != ']')
return;
size_t open_pos = name.find_last_of('[');
« no previous file with comments | « gpu/command_buffer/client/program_info_manager.cc ('k') | gpu/command_buffer/service/program_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698