[haiku-commits] Re: r40803 - haiku/trunk/src/kits/tracker

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 04 Mar 2011 17:32:20 +0100

jonas@xxxxxxxxxxx wrote:
> +/*!  \fn status_t GetLocalizedFileName(entry_ref& ref,
> +             BString& localizedFileName, bool traverse)

This can and should be left out when the comment is at the function 
anyway. It's only needed when you document a function without having 
the function body at hand.

> +     \brief Looks up a localized filename in a catalog, using 
> attribute data
> +             on the entry.
> +     \param ref An entry_ref with an attribute holding data for catalog 
> lookup.
> +     \param localizedFileName A pre-allocated BString object for the 
> result
> +             of the lookup.
> +     \param traverse A boolean to decide if symlinks are to be 
> traversed.
> +     \return
> +     - \c B_OK: success
> +     - \c B_ENTRY_NOT_FOUND: failure. Attribute not found, entry not 
> found
> +             in catalog, etc
> +     - other error codes: failure

While certainly nice, this isn't end user documentation, so it's okay 
IMO to not put that much effort into it :-)

> +     char* context = strchr(signature, ':');
> +     if (context) {

You may prefer (context != NULL) instead, at least that's what we pretty 
much settled on for readability.

Bye,
   Axel.


Other related posts: