Code review comment for lp:~azzar1/unity/custom-bg-color-icon

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

...also, I notice in several places you've done this:

36 - std::vector<std::string> const& data_dirs = GetDataDirectories();
37 + std::vector<std::string> const data_dirs(GetDataDirectories());

i.e.-= changed it from returning a const ref of T to a const copy of T.

I can't see what the point if making the T const is. You're returning a copy, so why do you care what the caller does it with? I'd suggest either returning a straight copy, or, if you think it's performance critical, return a const ref like it was.

Cheers,

« Back to merge proposal