Skip to content

parameters and variable have no purpose? #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ashleedawg opened this issue May 24, 2018 · 1 comment
Closed

parameters and variable have no purpose? #97

ashleedawg opened this issue May 24, 2018 · 1 comment

Comments

@ashleedawg
Copy link

I'm not sure whether this would be considered an issue in itself, but perhaps is the cause of other issues?

It seems that, in Private Function json_BufferToString (below), the parameter ByVal json_BufferLength As Long is required but not referenced anywhere within the function. The function is called several times elsewhere in the module, with the variable supplied. If it doesn't have a "purpose", why is in even listed?

Also, in Private Function json_StringIsLargeNumber, declared variable json_Index As Long is unused.

Is this unnecessary overhead?

Private Function json_BufferToString(ByRef json_buffer As String, ByVal json_BufferPosition As Long) As String
#If Mac Then
	json_BufferToString = json_buffer
#Else
	If json_BufferPosition > 0 Then
		json_BufferToString = VBA.Left$(json_buffer, json_BufferPosition \ 2)
	End If
#End If
End Function
@timhall
Copy link
Member

timhall commented May 24, 2018

Thanks for the code review @ashleedawg, I'll get those cleaned up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants