#10421: Optimization haiku\src\apps\clock\cl_view.cpp ----------------------------------+---------------------------- Reporter: vinion | Owner: nobody Type: enhancement | Status: new Priority: low | Milestone: R1 Component: Applications/Clock | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 0 | Platform: All ----------------------------------+---------------------------- Changes (by diver): * version: R1/alpha4 => R1/Development Old description: > The method > > BArchivable * > TOnscreenView::Instantiate(BMessage *data) > { > if (!validate_instantiation(data, "TOnscreenView")) > return NULL; > return new TOnscreenView(data); > } > > '''can be replaced with''' > > BArchivable * > TOnscreenView::Instantiate(BMessage *data) > { > return !validate_instantiation(data, "TOnscreenView") ? NULL : > new TOnscreenView(data); > } New description: The method {{{ BArchivable * TOnscreenView::Instantiate(BMessage *data) { if (!validate_instantiation(data, "TOnscreenView")) return NULL; return new TOnscreenView(data); } }}} can be replaced with {{{ BArchivable * TOnscreenView::Instantiate(BMessage *data) { return !validate_instantiation(data, "TOnscreenView") ? NULL : new TOnscreenView(data); } }}} -- -- Ticket URL: <http://dev.haiku-os.org/ticket/10421#comment:1> Haiku <http://dev.haiku-os.org> Haiku - the operating system.