Returning const arrays forces a copy

* This doesn't cover all cases but helps with 'pythonic' cases where a list
  returned from a function should be expected to be mutable. Modifying direct
  'members' can still modify through const.
This commit is contained in:
baldurk
2026-08-13 17:46:43 +01:00
parent 0bab6e4059
commit c95a69c8a1
5 changed files with 28 additions and 6 deletions
+2 -2
View File
@@ -484,8 +484,8 @@ struct CaptureContextInvoker : ObjectForwarder<ICaptureContext>
{
return m_Obj.GetCaptureModifications();
}
virtual const FrameDescription &FrameInfo() override { return m_Obj.FrameInfo(); }
virtual const APIProperties &APIProps() override { return m_Obj.APIProps(); }
virtual FrameDescription FrameInfo() override { return m_Obj.FrameInfo(); }
virtual APIProperties APIProps() override { return m_Obj.APIProps(); }
virtual rdcarray<ShaderEncoding> TargetShaderEncodings() override
{
return m_Obj.TargetShaderEncodings();