lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [lmi-commits] master 45156c8 3/6: Avoid gratuitous use of boos


From: Vadim Zeitlin
Subject: Re: [lmi] [lmi-commits] master 45156c8 3/6: Avoid gratuitous use of boost
Date: Sat, 24 Feb 2018 23:31:02 +0100

On Sat, 24 Feb 2018 17:26:45 -0500 (EST) Greg Chicares <address@hidden> wrote:

GC> branch: master
GC> commit 45156c8ae8b0d009ecf4a440c925e7c931479ece
GC> Author: Gregory W. Chicares <address@hidden>
GC> Commit: Gregory W. Chicares <address@hidden>
GC> 
GC>     Avoid gratuitous use of boost
GC> ---
GC>  ce_product_name.cpp | 4 ++++
GC>  ce_product_name.hpp | 4 ++--
GC>  ce_skin_name.hpp    | 2 --
GC>  3 files changed, 6 insertions(+), 4 deletions(-)
GC> 
GC> diff --git a/ce_product_name.cpp b/ce_product_name.cpp
GC> index ffb55bd..2c18cf2 100644
GC> --- a/ce_product_name.cpp
GC> +++ b/ce_product_name.cpp
GC> @@ -199,3 +199,7 @@ std::ostream& ce_product_name::write(std::ostream& os) 
const
GC>      return os << str();
GC>  }
GC>  
GC> +bool operator==(std::string const& s, ce_product_name const& z)
GC> +{
GC> +    return z == s;
GC> +}

 This is really, really minor, but it took me some time to realize why this
comparison had to be written in this inverted order. Could it be more clear
to write this as

        return s == z.str();

instead? And, maybe define operator==(ce_product_name, std::string) as a
similar global function for consistency?

VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]