From c2676288908e80bc5ee5614f3b42953c98e625bf Mon Sep 17 00:00:00 2001 From: Drake Arconis <lightdrake@gmail.com> Date: Sat, 19 Oct 2013 04:30:40 -0400 Subject: [PATCH] fixed: Clang warnings and a few coding style errors, float to double blah --- indra/llui/llview.cpp | 2 +- indra/newview/llviewerwearable.cpp | 2 +- indra/newview/llwaterparammanager.cpp | 2 +- indra/newview/llwlparamset.cpp | 4 ++-- indra/newview/pipeline.cpp | 10 +++++----- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 53274ea179..226f69c529 100755 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -872,7 +872,7 @@ LLView* LLView::childFromPoint(S32 x, S32 y, bool recur) return viewp; } - return 0; + return NULL; // <alchemy/> } BOOL LLView::handleToolTip(S32 x, S32 y, MASK mask) diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp index e8425dc76a..68332c3c9b 100644 --- a/indra/newview/llviewerwearable.cpp +++ b/indra/newview/llviewerwearable.cpp @@ -627,7 +627,7 @@ std::ostream& operator<<(std::ostream &s, const LLViewerWearable &w) //w.mSaleInfo s << " Params:" << "\n"; - for (LLWearable::visual_param_index_map_t::const_iterator iter = w.mVisualParamIndexMap.begin(); + for (LLViewerWearable::visual_param_index_map_t::const_iterator iter = w.mVisualParamIndexMap.begin(); // <alchemy/> iter != w.mVisualParamIndexMap.end(); ++iter) { S32 param_id = iter->first; diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index 72d628fb88..7a8916313a 100755 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -193,7 +193,7 @@ shader->uniform3fv(LLShaderMgr::WL_CAMPOSLOCAL, 1, LLViewerCamera::getInstance() shader->uniform4fv(LLShaderMgr::WATER_WATERPLANE, 1, mWaterPlane.mV); shader->uniform1f(LLShaderMgr::WATER_FOGDENSITY, getFogDensity()); shader->uniform1f(LLShaderMgr::WATER_FOGKS, mWaterFogKS); - shader->uniform1f(LLViewerShaderMgr::DISTANCE_MULTIPLIER, 0); + shader->uniform1f(LLViewerShaderMgr::DISTANCE_MULTIPLIER, 0.f); // <alchemy/> } } diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp index 8529a4614b..e1572f396f 100755 --- a/indra/newview/llwlparamset.cpp +++ b/indra/newview/llwlparamset.cpp @@ -150,9 +150,9 @@ void LLWLParamSet::update(LLGLSLShader * shader) const if (LLPipeline::sRenderDeferred && !LLPipeline::sReflectionRender && !LLPipeline::sUnderWaterRender) { - shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 2.2); + shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 2.2f); // <alchemy/> } else { - shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 1.0); + shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 1.0f); // <alchemy/> } } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 8401a30342..63d97c7154 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7890,9 +7890,9 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) if (!LLViewerCamera::getInstance()->cameraUnderWater()) { - shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 2.2); + shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 2.2f); // <alchemy/> } else { - shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 1.0); + shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 1.0f); // <alchemy/> } shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF); @@ -7938,9 +7938,9 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) if (!LLViewerCamera::getInstance()->cameraUnderWater()) { - shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 2.2); + shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 2.2f); // <alchemy/> } else { - shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 1.0); + shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 1.0f); // <alchemy/> } gGL.begin(LLRender::TRIANGLE_STRIP); @@ -8326,7 +8326,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n F32 ssao_factor = RenderSSAOFactor; shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_FACTOR, ssao_factor); - shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_FACTOR_INV, 1.0/ssao_factor); + shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_FACTOR_INV, 1.f/ssao_factor); // <alchemy/> LLVector3 ssao_effect = RenderSSAOEffect; shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_EFFECT, ssao_effect[0]); // <alchemy/> -- GitLab