Skip to content

Commit

Permalink
Make immutable array const #577
Browse files Browse the repository at this point in the history
from Hinara/patch-3
  • Loading branch information
Drewol authored Apr 18, 2022
2 parents 6cc2bd5 + 8205137 commit 3f150aa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Graphics/include/Graphics/Shader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace Graphics
{
#ifndef EMBEDDED
extern const uint32 shaderStageMap[];
#endif
/* Enum of supported shader types */
enum class ShaderType
{
Expand Down
3 changes: 0 additions & 3 deletions Graphics/src/Material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ namespace Graphics
{
};

// Defined in Shader.cpp
extern uint32 shaderStageMap[];

class Material_Impl : public MaterialRes
{
public:
Expand Down
6 changes: 3 additions & 3 deletions Graphics/src/Shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
namespace Graphics
{
#ifdef EMBEDDED
uint32 typeMap[] =
const uint32 typeMap[] =
{
GL_VERTEX_SHADER,
GL_FRAGMENT_SHADER,
};
#else
uint32 typeMap[] =
const uint32 typeMap[] =
{
GL_VERTEX_SHADER,
GL_FRAGMENT_SHADER,
GL_GEOMETRY_SHADER,
};
uint32 shaderStageMap[] =
const uint32 shaderStageMap[] =
{
GL_VERTEX_SHADER_BIT,
GL_FRAGMENT_SHADER_BIT,
Expand Down

0 comments on commit 3f150aa

Please sign in to comment.