Skip to content

Commit de47ae1

Browse files
authored
const warnings correction
for a more strict warnings compilation
1 parent 7f37e70 commit de47ae1

6 files changed

Lines changed: 17 additions & 17 deletions

File tree

libs/openFrameworks/gl/ofCubeMap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class ofCubeMap {
9797
void drawPrefilteredCube(float aRoughness);
9898

9999
bool isEnabled() { return data->isEnabled; }
100-
const bool isEnabled() const { return data->isEnabled; }
100+
bool isEnabled() const { return data->isEnabled; }
101101
void setEnabled(bool ab) { data->isEnabled = ab; }
102102

103103
bool hasCubeMap();

libs/openFrameworks/gl/ofMaterial.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class ofMaterial : public ofBaseMaterial {
182182

183183
/// \brief is this material pbr. Setting PBR functions or textures will automatically set the material to pbr.\nCan also be set calling setPBR(bool);
184184
/// \return is the material pbr.
185-
const bool isPBR() const { return data.isPbr; }
185+
bool isPBR() const { return data.isPbr; }
186186
/// \brief enable or disable PBR for this material. Default is disabled.
187187
void setPBR(bool ab);
188188

libs/openFrameworks/gl/ofShader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ string ofShader::parseForIncludes(const string & source, const of::filesystem::p
439439
string ofShader::parseForIncludes(const string & source, vector<string> & included, int level, const of::filesystem::path & sourceDirectoryPath) {
440440

441441
if (level > 32) {
442-
ofLogError("ofShader", "glsl header inclusion depth limit reached, might be caused by cyclic header inclusion");
442+
ofLogError("ofShader") << "glsl header inclusion depth limit reached, might be caused by cyclic header inclusion";
443443
return "";
444444
}
445445

libs/openFrameworks/gl/ofShadow.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -649,20 +649,20 @@ void ofShadow::setEnabled( bool ab ) {
649649
}
650650

651651
//--------------------------------------------------------------
652-
const bool ofShadow::isMultiCubeFacePass() const {
652+
bool ofShadow::isMultiCubeFacePass() const {
653653
if( data->lightType == OF_LIGHT_POINT ) {
654654
return !isSingleOmniPass();
655655
}
656656
return false;
657657
}
658658

659659
//--------------------------------------------------------------
660-
const bool ofShadow::isSingleOmniPass() const {
660+
bool ofShadow::isSingleOmniPass() const {
661661
return mBSinglePass;
662662
}
663663

664664
//--------------------------------------------------------------
665-
const int ofShadow::getNumShadowDepthPasses() const {
665+
int ofShadow::getNumShadowDepthPasses() const {
666666
if(isMultiCubeFacePass()) {
667667
return 6;
668668
}
@@ -1142,11 +1142,11 @@ void ofShadow::_updateNumShadows() {
11421142
#include "shaders/shadowDepth.frag"
11431143
#include "shaders/shadowDepthCubeGeom.glsl"
11441144

1145-
const bool ofShadow::setupShadowDepthShader(ofShader& ashader, const std::string aShaderMain) const {
1145+
bool ofShadow::setupShadowDepthShader(ofShader& ashader, const std::string aShaderMain) const {
11461146
return setupShadowDepthShader( ashader, data->lightType, aShaderMain, isSingleOmniPass() );
11471147
}
11481148

1149-
const bool ofShadow::setupShadowDepthShader(ofShader& ashader, int aLightType, const std::string aShaderMain, bool abSinglePass) const {
1149+
bool ofShadow::setupShadowDepthShader(ofShader& ashader, int aLightType, const std::string aShaderMain, bool abSinglePass) const {
11501150
std::string gversion = "#version 150\n";
11511151

11521152
#ifdef TARGET_OPENGLES

libs/openFrameworks/gl/ofShadow.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ class ofShadow {
126126
void setNearClip( float anear ) { data->nearClip = anear; }
127127
void setFarClip( float afar ) { data->farClip = afar; }
128128

129-
const bool isMultiCubeFacePass() const;
130-
const bool isSingleOmniPass() const;
131-
const int getNumShadowDepthPasses() const;
129+
bool isMultiCubeFacePass() const;
130+
bool isSingleOmniPass() const;
131+
int getNumShadowDepthPasses() const;
132132
void setSingleOmniPass( bool ab );
133133
int getDepthMapWidth();
134134
int getDepthMapHeight();
@@ -148,13 +148,13 @@ class ofShadow {
148148
const float& getStrength() { return data->strength; }
149149
void setStrength(float astrength) { data->strength = astrength; }
150150

151-
const float getBias() { return data->bias; }
151+
float getBias() const { return data->bias; }
152152
void setBias( float abias ) { data->bias = abias; }
153153

154-
const float getNormalBias() { return data->normalBias; }
154+
float getNormalBias() const { return data->normalBias; }
155155
void setNormalBias( float abias ) { data->normalBias = abias; }
156156

157-
const float getSampleRadius() { return data->sampleRadius; }
157+
float getSampleRadius() const { return data->sampleRadius; }
158158
void setSampleRadius( float aradius ) { data->sampleRadius = aradius; }
159159

160160
void setAreaLightSize( float awidth, float aheight ) {mAreaLightWidth=awidth;mAreaLightHeight=aheight;};
@@ -165,8 +165,8 @@ class ofShadow {
165165
std::string getShadowTypeAsString();
166166

167167
const ofShader & getDepthShader(ofGLProgrammableRenderer & renderer) const;
168-
const bool setupShadowDepthShader(ofShader& ashader, const std::string aShaderMain) const;
169-
const bool setupShadowDepthShader(ofShader& ashader, int aLightType, const std::string aShaderMain, bool abSinglePass) const;
168+
bool setupShadowDepthShader(ofShader& ashader, const std::string aShaderMain) const;
169+
bool setupShadowDepthShader(ofShader& ashader, int aLightType, const std::string aShaderMain, bool abSinglePass) const;
170170
void updateDepth(const ofShader & shader,ofGLProgrammableRenderer & renderer) const;
171171
void updateDepth(const ofShader & shader,GLenum aCubeFace,ofGLProgrammableRenderer & renderer) const;
172172

libs/openFrameworks/graphics/ofImage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ static bool saveImage(const ofPixels_<PixelType> & _pix, ofBuffer & buffer, ofIm
533533
ofInitFreeImage();
534534

535535
if (_pix.isAllocated() == false){
536-
ofLogError("ofImage","saveImage(): couldn't save to ofBuffer, pixels are not allocated");
536+
ofLogError("ofImage") << "saveImage(): couldn't save to ofBuffer, pixels are not allocated";
537537
return false;
538538
}
539539

0 commit comments

Comments
 (0)