Skip to content

Commit 434e3b7

Browse files
author
Matthias Kastner
committed
make optional parameter mandatory
this function is only used once, where the return type is always inputed. To re-implement the if-clause a check for zero-length strings is introduced which creates a display value without "-->".
1 parent 5e35159 commit 434e3b7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

procedures/CodeBrowser.ipf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,15 +268,15 @@ Function/S createMarkerForType(type)
268268
End
269269

270270
// Pretty printing of function/macro with additional info
271-
Function/S formatDecl(funcOrMacro, params, subtypeTag, [returnType])
271+
Function/S formatDecl(funcOrMacro, params, subtypeTag, returnType)
272272
string funcOrMacro, params, subtypeTag, returnType
273273

274274
if(!isEmpty(subtypeTag))
275275
subtypeTag = " : " + subtypeTag
276276
endif
277277

278278
string decl
279-
if(ParamIsDefault(returnType))
279+
if(strlen(returnType) == 0)
280280
sprintf decl, "%s(%s)%s", funcOrMacro, params, subtypeTag
281281
else
282282
sprintf decl, "%s(%s) -> %s%s", funcOrMacro, params, returnType, subtypeTag
@@ -319,7 +319,7 @@ Function addDecoratedFunctions(module, procedure, declWave, lineWave)
319319
subtypeTag = interpretSubtypeTag(StringByKey("SUBTYPE", fi))
320320
params = interpretParameters(fi)
321321
declWave[idx][0] = createMarkerForType("function" + specialTag + threadsafeTag)
322-
declWave[idx][1] = formatDecl(func, params, subtypeTag, returnType = returnType)
322+
declWave[idx][1] = formatDecl(func, params, subtypeTag, returnType)
323323
lineWave[idx] = NumberByKey("PROCLINE", fi)
324324
idx += 1
325325
endfor
@@ -720,7 +720,7 @@ static Function saveResults(procedure)
720720
SaveVariablesWave[procedure.row][2] = getCheckSumTime() // time in micro seconds
721721

722722
// if function list could not be acquired don't save the checksum
723-
if(!numpnts(declWave) || !cmpstr(declWave[0][1], "Procedures Not Compiled() -> "))
723+
if(!DimSize(declWave, 0) || !cmpstr(declWave[0][1], "Procedures Not Compiled()")) ///@todo check in all rows.
724724
DebugPrint("Function list is not complete")
725725
SaveStringsWave[procedure.row][1] = "no checksum"
726726
endif

0 commit comments

Comments
 (0)