[Lazarus] Add 'const' to func params

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Add 'const' to func params

Free Pascal - Lazarus mailing list
lcl/clipbrd.pp

     procedure SetAsHtml(Html: String);
     procedure SetAsHtml(Html: String; const PlainText: String);

--
Regards,
Alexey

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Add 'const' to func params

Free Pascal - Lazarus mailing list
On Tue, Apr 30, 2019 at 3:39 PM AlexeyT via lazarus
<[hidden email]> wrote:

>
> 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
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus