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

Unified Diff: chrome/renderer/webplugin_delegate_pepper.cc

Issue 2881014: Coverity: Fix missing const on WebPluginDelegatePepper::Device3DCreateContext override arg. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Created 10 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 | « chrome/renderer/webplugin_delegate_pepper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/webplugin_delegate_pepper.cc
diff --git a/chrome/renderer/webplugin_delegate_pepper.cc b/chrome/renderer/webplugin_delegate_pepper.cc
index 05e57620ef324904cece1248f2cee564060f1f05..9b557993428246c6b6db8e20e78d8340eac79e93 100644
--- a/chrome/renderer/webplugin_delegate_pepper.cc
+++ b/chrome/renderer/webplugin_delegate_pepper.cc
@@ -923,7 +923,7 @@ NPError WebPluginDelegatePepper::Device3DGetConfigAttribs(
NPError WebPluginDelegatePepper::Device3DCreateContext(
int32 config,
- int32* attrib_list,
+ const int32* attrib_list,
NPDeviceContext3D** context) {
if (!context)
return NPERR_GENERIC_ERROR;
@@ -936,7 +936,8 @@ NPError WebPluginDelegatePepper::Device3DCreateContext(
NPDeviceContext3DConfig old_config;
old_config.commandBufferSize = kDefaultCommandBufferSize;
if (attrib_list) {
- for (int32* attrib_pair = attrib_list; *attrib_pair; attrib_pair += 2) {
+ for (const int32* attrib_pair = attrib_list; *attrib_pair;
+ attrib_pair += 2) {
switch (attrib_pair[0]) {
case NP3DAttrib_CommandBufferSize:
old_config.commandBufferSize = attrib_pair[1];
@@ -1755,4 +1756,3 @@ void WebPluginDelegatePepper::DrawSkBitmapToCanvas(
CGContextRestoreGState(canvas);
}
#endif // defined(OS_MACOSX)
-
« no previous file with comments | « chrome/renderer/webplugin_delegate_pepper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698