Ugh
-
What was I thinking?
private static ProtoBlock LoadBlock(int x, int y, ByteReader stream, BlockHolder\[,\] blocks) { if (stream == null) return RadishHelper.LoadBlockData(x, y, blocks, null); return RadishHelper.LoadBlockData(x, y, blocks, stream); }
Firstly, there is no need to check for null, as it is quite possible to pass null values on if it is a null. Secondly, since the first point is true, this method only calls the other method, with no logic whatsoever. :doh:
-
What was I thinking?
private static ProtoBlock LoadBlock(int x, int y, ByteReader stream, BlockHolder\[,\] blocks) { if (stream == null) return RadishHelper.LoadBlockData(x, y, blocks, null); return RadishHelper.LoadBlockData(x, y, blocks, stream); }
Firstly, there is no need to check for null, as it is quite possible to pass null values on if it is a null. Secondly, since the first point is true, this method only calls the other method, with no logic whatsoever. :doh:
Oh, it's simply self-encouraging code. :rolleyes:
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke -
What was I thinking?
private static ProtoBlock LoadBlock(int x, int y, ByteReader stream, BlockHolder\[,\] blocks) { if (stream == null) return RadishHelper.LoadBlockData(x, y, blocks, null); return RadishHelper.LoadBlockData(x, y, blocks, stream); }
Firstly, there is no need to check for null, as it is quite possible to pass null values on if it is a null. Secondly, since the first point is true, this method only calls the other method, with no logic whatsoever. :doh:
jamie550 wrote:
What was I thinking?
About how sweet it will be when you finish up, and can go have a beer at the pub perhaps? :D
Mark Brock Click here to view my blog
-
What was I thinking?
private static ProtoBlock LoadBlock(int x, int y, ByteReader stream, BlockHolder\[,\] blocks) { if (stream == null) return RadishHelper.LoadBlockData(x, y, blocks, null); return RadishHelper.LoadBlockData(x, y, blocks, stream); }
Firstly, there is no need to check for null, as it is quite possible to pass null values on if it is a null. Secondly, since the first point is true, this method only calls the other method, with no logic whatsoever. :doh:
-
That is one of the 2 ways to declare a multi-array, the other way is [][]
-
That is one of the 2 ways to declare a multi-array, the other way is [][]
I believe there's a difference: int x[][] will declare an array of arrays of integers, each of which may be initialised with its own number of elements (i.e. a jagged array). int x[,] declares a 2-dimensional array, where the bounds of each dimension are specified when created and fixed.
-
I believe there's a difference: int x[][] will declare an array of arrays of integers, each of which may be initialised with its own number of elements (i.e. a jagged array). int x[,] declares a 2-dimensional array, where the bounds of each dimension are specified when created and fixed.
I didn't say they were the same :) but yes you are right about both of them.
-
That is one of the 2 ways to declare a multi-array, the other way is [][]