Skip to content

Commit 3f150aa

Browse files
authored
Make immutable array const #577
from Hinara/patch-3
2 parents 6cc2bd5 + 8205137 commit 3f150aa

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Graphics/include/Graphics/Shader.hpp

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
namespace Graphics
55
{
6+
#ifndef EMBEDDED
7+
extern const uint32 shaderStageMap[];
8+
#endif
69
/* Enum of supported shader types */
710
enum class ShaderType
811
{

Graphics/src/Material.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ namespace Graphics
5757
{
5858
};
5959

60-
// Defined in Shader.cpp
61-
extern uint32 shaderStageMap[];
62-
6360
class Material_Impl : public MaterialRes
6461
{
6562
public:

Graphics/src/Shader.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
namespace Graphics
77
{
88
#ifdef EMBEDDED
9-
uint32 typeMap[] =
9+
const uint32 typeMap[] =
1010
{
1111
GL_VERTEX_SHADER,
1212
GL_FRAGMENT_SHADER,
1313
};
1414
#else
15-
uint32 typeMap[] =
15+
const uint32 typeMap[] =
1616
{
1717
GL_VERTEX_SHADER,
1818
GL_FRAGMENT_SHADER,
1919
GL_GEOMETRY_SHADER,
2020
};
21-
uint32 shaderStageMap[] =
21+
const uint32 shaderStageMap[] =
2222
{
2323
GL_VERTEX_SHADER_BIT,
2424
GL_FRAGMENT_SHADER_BIT,

0 commit comments

Comments
 (0)