On 11/02/2013 6:02 a.m., Kinkie wrote:
> Hi all,
> the attached patch aims to c++-ify and standardize a bit more mime.cc
> and the auxiliary classes it contains.
>
> No functional changes.
> It'd be nice to change the mime table from being a table of regexes to
> a suffix search - after all, all mime extensions recorded there are
> suffixes except for the catch-all case.
>
> This code is however not on a critical path, so I'd leave that step
> post-stringng.
>
>
>
> --
> /kinkie
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_)
* please make MimeEntry a MEMPROXY class. Possibly also MimeIcon.
* please remove empty lines added at the end of MimeEntry class definition.
* 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.
* in MimeIcon::created there are debugs() being wrapped which need not
be. Later on there are setHeaders in the same position.
* MimeEmtry destructor opening { needs to be on the line following the
function name.
* please add a Mime:: namespace, and make the global function static
functions inside it, or members of one of the classes.
Amos
Received on Mon Feb 11 2013 - 02:46:00 MST
This archive was generated by hypermail 2.2.0 : Mon Feb 11 2013 - 12:01:34 MST