Skip to content

Commit bbfbf4c

Browse files
lioncashfincs
authored andcommitted
picasso: Mark member functions of DVLEData as const
These only query state about the data, they don't modify it
1 parent fbc3f38 commit bbfbf4c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

source/picasso.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,16 +226,16 @@ struct DVLEData
226226
u32 outputUsedReg;
227227
int outputCount;
228228

229-
bool usesGshSpace() { return isGeoShader && !isCompatGeoShader; }
230-
int findFreeOutput()
229+
bool usesGshSpace() const { return isGeoShader && !isCompatGeoShader; }
230+
int findFreeOutput() const
231231
{
232232
for (int i = 0; i < maxOutputReg(); i ++)
233233
if (!(outputMask & BIT(i)))
234234
return i;
235235
return -1;
236236
}
237237

238-
int findFreeInput()
238+
int findFreeInput() const
239239
{
240240
for (int i = 0; i < 16; i ++)
241241
if (!(inputMask & BIT(i)))

source/picasso_assembler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ struct UniformAllocBundle
8181

8282
static UniformAllocBundle unifAlloc[2];
8383

84-
static inline UniformAlloc& getAlloc(int type, DVLEData* dvle)
84+
static inline UniformAlloc& getAlloc(int type, const DVLEData* dvle)
8585
{
8686
int x = dvle->usesGshSpace();
8787
switch (type)

0 commit comments

Comments
 (0)