VireoSDK icon indicating copy to clipboard operation
VireoSDK copied to clipboard

StreamRead appears to have misconfigured parameters

Open negentropicdev opened this issue 3 years ago • 1 comments

https://github.com/ni/VireoSDK/blob/439b648943977e15aa705d4a3460ac61ea935a4a/source/io/FileIO.cpp#L166-L201

StreamRead has parameters: FileHandle, Output String, Num Elements, Return Status (Based on my interpretation of their usage in the method), however on line 438 NumElements is configured as an output.

I'd like to propose to swap parameters 2 and 3 and change the prototype definition to: p(i(FileHandle)i(Int32)o(String)o(Int32))

As it's currently: p(i(FileHandle)o(String)o(Int32)o(Int32))

I didn't see any tests referring to StreamRead so I presume it's likely not in use.

negentropicdev avatar Aug 19 '21 02:08 negentropicdev