codebackup / bwapi

Automatically exported from code.google.com/p/bwapi
0 stars 0 forks source link

Public Member Variables for Position #426

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice, perhaps in the BWAPI4 branch, to make the x and y member 
variables of the position classes public to save typing x() and y() when ever 
they are used.

Its a common technique used in many graphics libraries as these functions will 
never need to do any processing anyway.

Original issue reported on code.google.com by quaver.smith on 4 Jan 2012 at 7:43

GoogleCodeExporter commented 9 years ago
Since the members don't need to be private it's fine with me.

Original comment by AHeinerm on 4 Jan 2012 at 7:58

GoogleCodeExporter commented 9 years ago
One major problem with this is that we cannot have both x() and y() functions 
with the members x and y. Removing the x() and y() members would require 
everyone change their code. Any suggestions? Would it be worth getting rid of 
x() and y()?

Original comment by AHeinerm on 20 Feb 2012 at 1:30

GoogleCodeExporter commented 9 years ago
Or would it be fine if the _x and _y members were public?

Original comment by AHeinerm on 20 Feb 2012 at 1:30

GoogleCodeExporter commented 9 years ago
I think the code can be simply fixed by automatically replacing ".x()" with 
".x" and ".y()" with ".y" in all source files. It's not a hard manual work imho.

Original comment by AleXoun...@gmail.com on 22 Feb 2012 at 8:58

GoogleCodeExporter commented 9 years ago
Done in r4060.

Original comment by AHeinerm on 22 Feb 2012 at 10:11