@@ -1968,7 +1968,7 @@ string CGenerator::getErrorReturnValue(FunctionBase *fn)
1968
1968
}
1969
1969
}
1970
1970
1971
- string CGenerator::getFunctionServerCall (Function *fn, FunctionType *functionType, std::string prefix)
1971
+ string CGenerator::getFunctionServerCall (Function *fn, FunctionType *functionType, const std::string prefix)
1972
1972
{
1973
1973
string proto = " " ;
1974
1974
if (!fn->getReturnType ()->isVoid () && prefix.length () > 0 )
@@ -2910,7 +2910,7 @@ string CGenerator::getExtraDirectionPointer(StructMember *structMember)
2910
2910
return result;
2911
2911
}
2912
2912
2913
- data_map CGenerator::firstAllocOnReturnWhenIsNeed (string name, DataType *dataType)
2913
+ data_map CGenerator::firstAllocOnReturnWhenIsNeed (const string & name, DataType *dataType)
2914
2914
{
2915
2915
DataType *trueDataType = dataType->getTrueDataType ();
2916
2916
if ((trueDataType->isArray () || trueDataType->isStruct () || trueDataType->isUnion ()) &&
@@ -2923,7 +2923,7 @@ data_map CGenerator::firstAllocOnReturnWhenIsNeed(string name, DataType *dataTyp
2923
2923
return r;
2924
2924
}
2925
2925
2926
- data_map CGenerator::firstAllocOnServerWhenIsNeed (string name, StructMember *structMember)
2926
+ data_map CGenerator::firstAllocOnServerWhenIsNeed (const string & name, StructMember *structMember)
2927
2927
{
2928
2928
DataType *dataType = structMember->getDataType ();
2929
2929
DataType *trueDataType = dataType->getTrueDataType ();
@@ -3242,10 +3242,10 @@ bool CGenerator::containsByrefParamToFree(DataType *dataType, set<DataType *> &d
3242
3242
return false ;
3243
3243
}
3244
3244
3245
- bool CGenerator::isListStruct (StructType *structType)
3245
+ bool CGenerator::isListStruct (const StructType *structType)
3246
3246
{
3247
3247
// if structure is transformed list<> to struct{list<>}
3248
- for (StructType *structList : m_structListTypes)
3248
+ for (const StructType *structList : m_structListTypes)
3249
3249
{
3250
3250
if (structType == structList)
3251
3251
{
@@ -3272,11 +3272,11 @@ bool CGenerator::isBinaryStruct(StructType *structType)
3272
3272
return false ;
3273
3273
}
3274
3274
3275
- bool CGenerator::isBinaryList (ListType *listType)
3275
+ bool CGenerator::isBinaryList (const ListType *listType)
3276
3276
{
3277
3277
3278
3278
// If list is same as in s_listBinaryTypes.
3279
- for (ListType *list : m_listBinaryTypes)
3279
+ for (const ListType *list : m_listBinaryTypes)
3280
3280
{
3281
3281
if (listType == list)
3282
3282
{
0 commit comments