All pastes #291303 Raw Edit

Someone

public text v1 · immutable
#291303 ·published 2006-12-25 00:19 UTC
rendered paste body
void method( var1, var2 )
{
	if ( something )
	{
		// Do 20 things
	}
	else
	{
		// Do 20 other things
	}

	// Do something

	if ( somethingelse )
	{
		// Do 15 things
	}
	else
	{
		// Do 25 other things
	}

	// Do something else

	if ( God )
	{
		// Do 30 things
	}
	else
	{
		// Do 50 other things
	}

}

Changes to:

void method2( )
{
	if ( something )
	{
		// Do 20 things
	}
	else
	{
		// Do 20 other things
	}
}

void method3( var1, var2 )
{
	if ( somethingelse )
	{
		// Do 15 things
	}
	else
	{
		// Do 25 other things
	}
}

void method4( )
{
	if ( God )
	{
		// Do 30 things
	}
	else
	{
		// Do 50 other things
	}
}

void method( var1, var2 )
{
	method2( );

	// Do something

	method3( var1, var2 );

	// Do something else

	method4( );
}