(svn r17692) -Codechange: minor coding style fixes

This commit is contained in:
smatz
2009-10-04 17:10:57 +00:00
parent 1666f7a1a9
commit 32cbe57178
12 changed files with 28 additions and 16 deletions

View File

@@ -13,7 +13,8 @@
#
# Simple insertion sort.
function array_sort(ARRAY, ELEMENTS, temp, i, j) {
function array_sort(ARRAY, ELEMENTS, temp, i, j)
{
for (i = 2; i <= ELEMENTS; i++)
for (j = i; ARRAY[j - 1] > ARRAY[j]; --j) {
temp = ARRAY[j]
@@ -23,7 +24,8 @@ function array_sort(ARRAY, ELEMENTS, temp, i, j) {
return
}
function dump_class_templates(name) {
function dump_class_templates(name)
{
print " template <> " name " *GetParam(ForceType<" name " *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" name " *)instance; }"
print " template <> " name " &GetParam(ForceType<" name " &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(" name " *)instance; }"
print " template <> const " name " *GetParam(ForceType<const " name " *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (" name " *)instance; }"