Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2019-04

Add 'const' to func params

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

AlexeyT

lcl/clipbrd.pp

     procedure SetAsHtml(Html: String);
     procedure SetAsHtml(Html: String; const PlainText: String);
Regards, Alexey

Reply by email

Bart
to AlexeyT
PM AlexeyT wrote 5 lines
lcl/clipbrd.pp procedure SetAsHtml(Html: String); procedure SetAsHtml(Html: String; const PlainText: String);

This would force us to make a copy of the HTML parameter, since it can get modified in the procedure.
So, it makes no sense to me.

Bart

Bart

Reply by email