mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-01 03:50:28 +08:00
5fea2f87dc
Analyzing the fhandler::copyto logic shows that the fhandler_base::reset method was only called from copyto anyway. Trying to convert reset to a protected method uncovered that the copyto method is actually thought upside down from an object oriented POV. Rather than calling copyto, manipulating the object given as parameter, rename the method to copy_from, which manipulates the calling object itself with data from the object given as parameter. Eventually make reset a protected method and rename it to _copy_from_reset_helper to clarify it's only called from copy_from. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at https://cygwin.com You might especially be interested in https://cygwin.com/faq/faq.html#faq.programming.building-cygwin