On Sun, Nov 4, 2012 at 4:17 AM, Sage Weil <sage@xxxxxxxxxxx> wrote: > > but this is actually doing the lookup twice. A better pattern: > > map<foo, bar>::iterator p = container.find(key); > if (p == container.end()) > return NULL; > return p->second; Cool, thanks for tip! -- 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