Re: [PATCH] Refactor mime.cc

From: Kinkie <gkinkie_at_gmail.com>
Date: Mon, 11 Feb 2013 12:01:43 +0100

> Since this is a refactor please fix the coding guidelines differences as
> well. I have added some here:
>
> * private variables suffixed with '_' (ie MimeIcon::url_, MimeIcon::icon_)

Done.

> * please make MimeEntry a MEMPROXY class. Possibly also MimeIcon.

Done.

> * please remove empty lines added at the end of MimeEntry class definition.

Done.

> * with MimeIcon url and icon members being private you are free to update to
> String from char*. Which will remove the need for all the char* management
> code inside that object.

I'd prefer not. I'd aim for SBuf (post-StringNg) or std::string.
String useage should not be extended at this stage.

> * in MimeIcon::created there are debugs() being wrapped which need not be.
> Later on there are setHeaders in the same position.

Unwrapped.

> * MimeEmtry destructor opening { needs to be on the line following the
> function name.

doh! Thanks

> * please add a Mime:: namespace, and make the global function static
> functions inside it, or members of one of the classes.

I'd consider this a futher step, to be left as TODO (together with the
rethinking of whether we really want to use regexes here, or if we'd
better off with a suffix lookup).

-- 
    /kinkie
Received on Mon Feb 11 2013 - 11:01:58 MST

This archive was generated by hypermail 2.2.0 : Wed Feb 13 2013 - 12:00:08 MST