mben-dz / FinalTypes

API.FinalTypes unit to assist the programmer in working between both frameworks, VCL & FMX.
1 stars 0 forks source link

Combine Stream helpers #1

Open geoffsmith82 opened 2 months ago

geoffsmith82 commented 2 months ago

I believe if instead of having a TMemoryStreamHelper and a TStringStreamHelper, you just have a TStream helper, you should be able to handle any TStream decendent without having a separate stream helper for each one.

There may be some reason to have separate helpers in the future, but at present it doesn't look like this is required.

mben-dz commented 2 months ago

Yes, I totally agree with you, but I added them to use the ready-to-use Clear function, which I think is not in the base class TStream. In any case, your suggested solution is always logical.