Opened 11 years ago

Closed 11 years ago

#10421 closed enhancement (invalid)

Optimization haiku\src\apps\clock\cl_view.cpp

Reported by: vinion Owned by: nobody
Priority: low Milestone: R1
Component: Applications/Clock Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by diver)

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);
}

Change History (2)

comment:1 by diver, 11 years ago

Description: modified (diff)
Version: R1/alpha4R1/Development

comment:2 by anevilyak, 11 years ago

Resolution: invalid
Status: newclosed

That's not an optimization in any way whatsoever, and simply makes the code less readable.

Note: See TracTickets for help on using tickets.