monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] dumb question - node::clone()


From: Zack Weinberg
Subject: Re: [Monotone-devel] dumb question - node::clone()
Date: Sun, 24 Jun 2007 19:37:30 -0700

On 6/24/07, Timothy Brownawell <address@hidden> wrote:
On Sun, 2007-06-24 at 10:30 -0700, Zack Weinberg wrote:
> Do the clone() methods for dir_node and file_node do anything that the
> respective copy constructors wouldn't do?

They're virtual functions, which means that you can call clone() on a
node* (which will actually point to a dir_node or file_node), and get a
new dir_node or file_node as appropriate. Using a copy constructor
directly means that you have to know in advance what type you're trying
to get.

I should have been clearer.  *Other than that*, is there any difference?

zw




reply via email to

[Prev in Thread] Current Thread [Next in Thread]