Reputation: 1
I'm compiling a function that worked correctly in delphi XE, but now compiling it in delphi Rio gives me the following error: [dcc32 Error] sBuffer.pas (330): E2015 Operator not applicable to this operand type
//type of variables used:
Buffer: Psingle;
bufferPos: Cardinal;
fchannels: Cardinal;
function sbuffer.Ptrbegin: Psingle;
begin
Result := (buffer + bufferPos * fchannels); //---> Error
end;
[dcc32 Error] sBuffer.pas (330): E2015 Operator not applicable to this operand type
Upvotes: 0
Views: 179
Reputation: 613311
You need to enable the pointer math option:
{$POINTERMATH ON}
Upvotes: 2