Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 86dc513

Browse files
MortimerGoroRandall E. Barker
authored and
Randall E. Barker
committed
Fix unneeded static keyword inside empty namespace warnings (#1273)
1 parent 37a49f3 commit 86dc513

File tree

4 files changed

+68
-68
lines changed

4 files changed

+68
-68
lines changed

app/src/googlevr/cpp/DeviceDelegateGoogleVR.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727

2828
namespace {
2929

30-
static const vrb::Vector kAverageHeight(0.0f, 1.7f, 0.0f);
31-
static const int32_t kMaxControllerCount = 2;
30+
const vrb::Vector kAverageHeight(0.0f, 1.7f, 0.0f);
31+
const int32_t kMaxControllerCount = 2;
3232

3333
struct Controller {
3434
vrb::Matrix transform;

app/src/main/cpp/BrowserWorld.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ using namespace vrb;
7070

7171
namespace {
7272

73-
static const int GestureSwipeLeft = 0;
74-
static const int GestureSwipeRight = 1;
73+
const int GestureSwipeLeft = 0;
74+
const int GestureSwipeRight = 1;
7575

76-
static const float kScrollFactor = 20.0f; // Just picked what fell right.
77-
static const float kWorldDPIRatio = 2.0f/720.0f;
78-
static const double kHoverRate = 1.0 / 10.0;
76+
const float kScrollFactor = 20.0f; // Just picked what fell right.
77+
const float kWorldDPIRatio = 2.0f/720.0f;
78+
const double kHoverRate = 1.0 / 10.0;
7979

8080
#if SPACE_THEME == 1
8181
static const std::string CubemapDay = "cubemap/space";

app/src/main/cpp/ExternalBlitter.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <map>
1616

1717
namespace {
18-
static const char* sVertexShader = R"SHADER(
18+
const char* sVertexShader = R"SHADER(
1919
attribute vec4 a_position;
2020
attribute vec2 a_uv;
2121
varying vec2 v_uv;
@@ -25,7 +25,7 @@ void main(void) {
2525
}
2626
)SHADER";
2727

28-
static const char* sFragmentShader = R"SHADER(
28+
const char* sFragmentShader = R"SHADER(
2929
#extension GL_OES_EGL_image_external : require
3030
precision mediump float;
3131
@@ -38,7 +38,7 @@ void main() {
3838
}
3939
)SHADER";
4040

41-
static const GLfloat sVerticies[] = {
41+
const GLfloat sVerticies[] = {
4242
-1.0f, 1.0f, 0.0f,
4343
-1.0f, -1.0f, 0.0f,
4444
1.0f, 1.0f, 0.0f,

app/src/main/cpp/VRBrowser.cpp

+58-58
Original file line numberDiff line numberDiff line change
@@ -10,64 +10,64 @@
1010

1111
namespace {
1212

13-
static const char* kDispatchCreateWidgetName = "dispatchCreateWidget";
14-
static const char* kDispatchCreateWidgetSignature = "(ILandroid/graphics/SurfaceTexture;II)V";
15-
static const char* kDispatchCreateWidgetLayerName = "dispatchCreateWidgetLayer";
16-
static const char* kDispatchCreateWidgetLayerSignature = "(ILandroid/view/Surface;IIJ)V";
17-
static const char* kHandleMotionEventName = "handleMotionEvent";
18-
static const char* kHandleMotionEventSignature = "(IIZFF)V";
19-
static const char* kHandleScrollEventName = "handleScrollEvent";
20-
static const char* kHandleScrollEventSignature = "(IIFF)V";
21-
static const char* kHandleAudioPoseName = "handleAudioPose";
22-
static const char* kHandleAudioPoseSignature = "(FFFFFFF)V";
23-
static const char* kHandleGestureName = "handleGesture";
24-
static const char* kHandleGestureSignature = "(I)V";
25-
static const char* kHandleResizeName = "handleResize";
26-
static const char* kHandleResizeSignature = "(IFF)V";
27-
static const char* kHandleBackEventName = "handleBack";
28-
static const char* kHandleBackEventSignature = "()V";
29-
static const char* kRegisterExternalContextName = "registerExternalContext";
30-
static const char* kRegisterExternalContextSignature = "(J)V";
31-
static const char* kPauseCompositorName = "pauseGeckoViewCompositor";
32-
static const char* kPauseCompositorSignature = "()V";
33-
static const char* kResumeCompositorName = "resumeGeckoViewCompositor";
34-
static const char* kResumeCompositorSignature = "()V";
35-
static const char* kRenderPointerLayerName = "renderPointerLayer";
36-
static const char* kRenderPointerLayerSignature = "(Landroid/view/Surface;J)V";
37-
static const char* kGetStorageAbsolutePathName = "getStorageAbsolutePath";
38-
static const char* kGetStorageAbsolutePathSignature = "()Ljava/lang/String;";
39-
static const char* kIsOverrideEnvPathEnabledName = "isOverrideEnvPathEnabled";
40-
static const char* kIsOverrideEnvPathEnabledSignature = "()Z";
41-
static const char* kGetActiveEnvironment = "getActiveEnvironment";
42-
static const char* kGetActiveEnvironmentSignature = "()Ljava/lang/String;";
43-
static const char* kGetPointerColor = "getPointerColor";
44-
static const char* kGetPointerColorSignature = "()I";
45-
static const char* kAreLayersEnabled = "areLayersEnabled";
46-
static const char* kAreLayersEnabledSignature = "()Z";
47-
static const char* kSetDeviceType = "setDeviceType";
48-
static const char* kSetDeviceTypeSignature = "(I)V";
49-
50-
static JNIEnv* sEnv;
51-
static jclass sBrowserClass;
52-
static jobject sActivity;
53-
static jmethodID sDispatchCreateWidget;
54-
static jmethodID sDispatchCreateWidgetLayer;
55-
static jmethodID sHandleMotionEvent;
56-
static jmethodID sHandleScrollEvent;
57-
static jmethodID sHandleAudioPose;
58-
static jmethodID sHandleGesture;
59-
static jmethodID sHandleResize;
60-
static jmethodID sHandleBack;
61-
static jmethodID sRegisterExternalContext;
62-
static jmethodID sPauseCompositor;
63-
static jmethodID sResumeCompositor;
64-
static jmethodID sRenderPointerLayer;
65-
static jmethodID sGetStorageAbsolutePath;
66-
static jmethodID sIsOverrideEnvPathEnabled;
67-
static jmethodID sGetActiveEnvironment;
68-
static jmethodID sGetPointerColor;
69-
static jmethodID sAreLayersEnabled;
70-
static jmethodID sSetDeviceType;
13+
const char* kDispatchCreateWidgetName = "dispatchCreateWidget";
14+
const char* kDispatchCreateWidgetSignature = "(ILandroid/graphics/SurfaceTexture;II)V";
15+
const char* kDispatchCreateWidgetLayerName = "dispatchCreateWidgetLayer";
16+
const char* kDispatchCreateWidgetLayerSignature = "(ILandroid/view/Surface;IIJ)V";
17+
const char* kHandleMotionEventName = "handleMotionEvent";
18+
const char* kHandleMotionEventSignature = "(IIZFF)V";
19+
const char* kHandleScrollEventName = "handleScrollEvent";
20+
const char* kHandleScrollEventSignature = "(IIFF)V";
21+
const char* kHandleAudioPoseName = "handleAudioPose";
22+
const char* kHandleAudioPoseSignature = "(FFFFFFF)V";
23+
const char* kHandleGestureName = "handleGesture";
24+
const char* kHandleGestureSignature = "(I)V";
25+
const char* kHandleResizeName = "handleResize";
26+
const char* kHandleResizeSignature = "(IFF)V";
27+
const char* kHandleBackEventName = "handleBack";
28+
const char* kHandleBackEventSignature = "()V";
29+
const char* kRegisterExternalContextName = "registerExternalContext";
30+
const char* kRegisterExternalContextSignature = "(J)V";
31+
const char* kPauseCompositorName = "pauseGeckoViewCompositor";
32+
const char* kPauseCompositorSignature = "()V";
33+
const char* kResumeCompositorName = "resumeGeckoViewCompositor";
34+
const char* kResumeCompositorSignature = "()V";
35+
const char* kRenderPointerLayerName = "renderPointerLayer";
36+
const char* kRenderPointerLayerSignature = "(Landroid/view/Surface;J)V";
37+
const char* kGetStorageAbsolutePathName = "getStorageAbsolutePath";
38+
const char* kGetStorageAbsolutePathSignature = "()Ljava/lang/String;";
39+
const char* kIsOverrideEnvPathEnabledName = "isOverrideEnvPathEnabled";
40+
const char* kIsOverrideEnvPathEnabledSignature = "()Z";
41+
const char* kGetActiveEnvironment = "getActiveEnvironment";
42+
const char* kGetActiveEnvironmentSignature = "()Ljava/lang/String;";
43+
const char* kGetPointerColor = "getPointerColor";
44+
const char* kGetPointerColorSignature = "()I";
45+
const char* kAreLayersEnabled = "areLayersEnabled";
46+
const char* kAreLayersEnabledSignature = "()Z";
47+
const char* kSetDeviceType = "setDeviceType";
48+
const char* kSetDeviceTypeSignature = "(I)V";
49+
50+
JNIEnv* sEnv;
51+
jclass sBrowserClass;
52+
jobject sActivity;
53+
jmethodID sDispatchCreateWidget;
54+
jmethodID sDispatchCreateWidgetLayer;
55+
jmethodID sHandleMotionEvent;
56+
jmethodID sHandleScrollEvent;
57+
jmethodID sHandleAudioPose;
58+
jmethodID sHandleGesture;
59+
jmethodID sHandleResize;
60+
jmethodID sHandleBack;
61+
jmethodID sRegisterExternalContext;
62+
jmethodID sPauseCompositor;
63+
jmethodID sResumeCompositor;
64+
jmethodID sRenderPointerLayer;
65+
jmethodID sGetStorageAbsolutePath;
66+
jmethodID sIsOverrideEnvPathEnabled;
67+
jmethodID sGetActiveEnvironment;
68+
jmethodID sGetPointerColor;
69+
jmethodID sAreLayersEnabled;
70+
jmethodID sSetDeviceType;
7171
}
7272

7373
namespace crow {

0 commit comments

Comments
 (0)