[haiku-development] Re: ext3 Journal Design Considerations

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 14 Apr 2010 09:33:14 +0200

On 2010-04-14 at 04:36:51 [+0200], Janito Ferreira Filho 
<jvffprog@xxxxxxxxxxx> wrote:
> One last thing, what's the usual semantics for an InitCheck function?

In Be API classes it returns the initialization error code as a status_t, 
i.e. B_OK, if the class is correctly initialized. Personally I prefer 
explicit initialization methods (SetTo() or Init()) over constructor 
initialization + InitCheck(), since oftentimes in the latter case one 
either can't provide the actual error code (i.e. has to return B_ERROR or 
B_NO_INIT) or has to add an extra attribute to store the error code (many 
Be API classes do).

CU, Ingo

Other related posts: