[m-dev.] for review: deep copy cleanup.

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Jun 2 14:41:39 AEST 1998


On 02-Jun-1998, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> Here's a cleanup of deep copy.  This should make it easier to add
> other functions that need to do similar things. 

Thanks!

> +    switch(data_rep) {
...
> +        case MR_DATAREP_INT:
> +            new_data = data;
> +            break;
> +
> +        case MR_DATAREP_CHAR:
> +            new_data = data;
> +            break;

I think you could make more use of fallthru here.

> +enum MR_DataRepresentation
> +MR_categorize_data(Word functors_indicator, Word layout_entry)
> +{
> +        switch(functors_indicator) { 
> +                case MR_TYPEFUNCTORS_ENUM: 
> +                        return MR_DATAREP_ENUM;
> +                        break;
> +                case MR_TYPEFUNCTORS_DU: 
> +                        switch (tag(layout_entry)) {

I suggest you delete the "break;" after the "return",
and be consistent about the use of "switch(" vs "switch (".

Otherwise, that change looks fine, so please go ahead and commit it.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list