Fix const-correctness in dictionary iterator access
This commit is contained in:
@@ -2142,7 +2142,7 @@ const Variant& VisualScript::GetScriptInstanceParameterValue(const StringView& n
|
||||
return Variant::Null;
|
||||
}
|
||||
|
||||
void VisualScript::SetScriptInstanceParameterValue(const StringView& name, ScriptingObject* instance, const Variant& value) const
|
||||
void VisualScript::SetScriptInstanceParameterValue(const StringView& name, ScriptingObject* instance, const Variant& value)
|
||||
{
|
||||
CHECK(instance);
|
||||
for (int32 paramIndex = 0; paramIndex < Graph.Parameters.Count(); paramIndex++)
|
||||
@@ -2163,7 +2163,7 @@ void VisualScript::SetScriptInstanceParameterValue(const StringView& name, Scrip
|
||||
LOG(Warning, "Failed to set {0} parameter '{1}'", ToString(), name);
|
||||
}
|
||||
|
||||
void VisualScript::SetScriptInstanceParameterValue(const StringView& name, ScriptingObject* instance, Variant&& value) const
|
||||
void VisualScript::SetScriptInstanceParameterValue(const StringView& name, ScriptingObject* instance, Variant&& value)
|
||||
{
|
||||
CHECK(instance);
|
||||
for (int32 paramIndex = 0; paramIndex < Graph.Parameters.Count(); paramIndex++)
|
||||
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
/// <param name="name">The parameter name.</param>
|
||||
/// <param name="instance">The object instance.</param>
|
||||
/// <param name="value">The property value to set.</param>
|
||||
API_FUNCTION() void SetScriptInstanceParameterValue(const StringView& name, ScriptingObject* instance, const Variant& value) const;
|
||||
API_FUNCTION() void SetScriptInstanceParameterValue(const StringView& name, ScriptingObject* instance, const Variant& value);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the value of the Visual Script parameter of the given instance.
|
||||
@@ -225,7 +225,7 @@ public:
|
||||
/// <param name="name">The parameter name.</param>
|
||||
/// <param name="instance">The object instance.</param>
|
||||
/// <param name="value">The property value to set.</param>
|
||||
void SetScriptInstanceParameterValue(const StringView& name, ScriptingObject* instance, Variant&& value) const;
|
||||
void SetScriptInstanceParameterValue(const StringView& name, ScriptingObject* instance, Variant&& value);
|
||||
|
||||
/// <summary>
|
||||
/// Tries to find the method matching the given properties. Doesn't check base classes but just this script.
|
||||
|
||||
@@ -72,7 +72,7 @@ struct ShadowAtlasLightTile
|
||||
Matrix WorldToShadow;
|
||||
float FramesToUpdate; // Amount of frames (with fraction) until the next shadow update can happen
|
||||
bool SkipUpdate;
|
||||
bool HasStaticGeometry;
|
||||
mutable bool HasStaticGeometry;
|
||||
Viewport CachedViewport; // The viewport used the last time to render shadow to the atlas
|
||||
|
||||
void FreeDynamic(ShadowsCustomBuffer* buffer);
|
||||
@@ -190,7 +190,7 @@ struct ShadowAtlasLight
|
||||
uint8 TilesNeeded;
|
||||
uint8 TilesCount;
|
||||
bool HasStaticShadowContext;
|
||||
StaticStates StaticState;
|
||||
mutable StaticStates StaticState;
|
||||
BoundingSphere Bounds;
|
||||
float Sharpness, Fade, NormalOffsetScale, Bias, FadeDistance, Distance, TileBorder;
|
||||
Float4 CascadeSplits;
|
||||
@@ -1393,7 +1393,7 @@ void ShadowsPass::RenderShadowMaps(RenderContextBatch& renderContextBatch)
|
||||
bool renderedAny = false;
|
||||
for (auto& e : shadows.Lights)
|
||||
{
|
||||
ShadowAtlasLight& atlasLight = e.Value;
|
||||
const ShadowAtlasLight& atlasLight = e.Value;
|
||||
if (!atlasLight.HasStaticShadowContext || atlasLight.ContextCount == 0)
|
||||
continue;
|
||||
int32 contextIndex = 0;
|
||||
@@ -1403,7 +1403,7 @@ void ShadowsPass::RenderShadowMaps(RenderContextBatch& renderContextBatch)
|
||||
// Check for any static geometry to use in static shadow map
|
||||
for (int32 tileIndex = 0; tileIndex < atlasLight.TilesCount; tileIndex++)
|
||||
{
|
||||
ShadowAtlasLightTile& tile = atlasLight.Tiles[tileIndex];
|
||||
const ShadowAtlasLightTile& tile = atlasLight.Tiles[tileIndex];
|
||||
contextIndex++; // Skip dynamic context
|
||||
auto& shadowContextStatic = renderContextBatch.Contexts[atlasLight.ContextIndex + contextIndex++];
|
||||
if (!shadowContextStatic.List->DrawCallsLists[(int32)DrawCallsListType::Depth].IsEmpty() || !shadowContextStatic.List->ShadowDepthDrawCallsList.IsEmpty())
|
||||
@@ -1419,7 +1419,7 @@ void ShadowsPass::RenderShadowMaps(RenderContextBatch& renderContextBatch)
|
||||
contextIndex = 0;
|
||||
for (int32 tileIndex = 0; tileIndex < atlasLight.TilesCount; tileIndex++)
|
||||
{
|
||||
ShadowAtlasLightTile& tile = atlasLight.Tiles[tileIndex];
|
||||
const ShadowAtlasLightTile& tile = atlasLight.Tiles[tileIndex];
|
||||
if (!tile.RectTile)
|
||||
break;
|
||||
if (!tile.StaticRectTile)
|
||||
@@ -1472,13 +1472,13 @@ void ShadowsPass::RenderShadowMaps(RenderContextBatch& renderContextBatch)
|
||||
context->SetRenderTarget(shadows.ShadowMapAtlas->View(), (GPUTextureView*)nullptr);
|
||||
for (auto& e : shadows.Lights)
|
||||
{
|
||||
ShadowAtlasLight& atlasLight = e.Value;
|
||||
const ShadowAtlasLight& atlasLight = e.Value;
|
||||
if (atlasLight.ContextCount == 0)
|
||||
continue;
|
||||
int32 contextIndex = 0;
|
||||
for (int32 tileIndex = 0; tileIndex < atlasLight.TilesCount; tileIndex++)
|
||||
{
|
||||
ShadowAtlasLightTile& tile = atlasLight.Tiles[tileIndex];
|
||||
const ShadowAtlasLightTile& tile = atlasLight.Tiles[tileIndex];
|
||||
if (!tile.RectTile)
|
||||
break;
|
||||
if (tile.SkipUpdate)
|
||||
|
||||
Reference in New Issue
Block a user