Opened 5 years ago

Closed 5 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:
Has a Patch: no 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 Changed 5 years ago by diver

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

comment:2 Changed 5 years ago by anevilyak

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.