Re: [PATCH 13/15] src/osd/osd_types.h: pass function parameter by reference

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

 



On Thu, 7 Feb 2013, Danny Al-Gaaf wrote:
> Fix "(performance) Function parameter 'e' should be passed by reference."
> from cppchecker.

eversion_t is only 12-16 bytes (depending on alignment), so I'm not sure a 
pointer indirection (or whatever the compiler turns the & parameter into) 
is going to buy us anything.

> 
> Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@xxxxxxxxx>
> ---
>  src/osd/osd_types.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h
> index e068057..b193c2b 100644
> --- a/src/osd/osd_types.h
> +++ b/src/osd/osd_types.h
> @@ -496,7 +496,7 @@ inline bool operator>(const eversion_t& l, const eversion_t& r) {
>  inline bool operator>=(const eversion_t& l, const eversion_t& r) {
>    return (l.epoch == r.epoch) ? (l.version >= r.version):(l.epoch >= r.epoch);
>  }
> -inline ostream& operator<<(ostream& out, const eversion_t e) {
> +inline ostream& operator<<(ostream& out, const eversion_t& e) {
>    return out << e.epoch << "'" << e.version;
>  }
>  
> -- 
> 1.8.1.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux