medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit ab147445a06bad9f12327610187c63f9dd681916
parent 68ec670f387a0b5883215a9b8626fd23ce1095f1
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Tue Nov 22 21:16:39 +0200

T -> F

Diffstat:
scripts/gen_visitors.lua | 8++++----
visitors/linear_algebra.h | 74+++++++++++++++++++++++++++++++++++++-------------------------------------
2 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/scripts/gen_visitors.lua b/scripts/gen_visitors.lua @@ -17,12 +17,12 @@ for struct, members in contents:gmatch( "// AUTOVISITOR%s+struct%s+(%w+)%s+(%b{} members = members:gsub( "%b{}", "" ) local visitor = { - "template< typename T >", - "void visit_members( " .. struct .. " & obj, T f ) {", + "template< typename F >", + "void visit_members( " .. struct .. " & obj, F f ) {", } local named_visitor = { - "template< typename T >", - "void visit_named_members( " .. struct .. " & obj, T f ) {", + "template< typename F >", + "void visit_named_members( " .. struct .. " & obj, F f ) {", } for names in members:gmatch( "\n\t*%w+%s+([%w, ]+)%s*;" ) do diff --git a/visitors/linear_algebra.h b/visitors/linear_algebra.h @@ -1,128 +1,128 @@ /* * This file was autogenerated by scripts/gen_visitors.lua linear_algebra.h - * at Tue Nov 22 20:43:18 2016. Please do not edit it by hand! + * at Tue Nov 22 21:16:20 2016. Please do not edit it by hand! */ -template< typename T > -void visit_members( v2 & obj, T f ) { +template< typename F > +void visit_members( v2 & obj, F f ) { f( obj.x ); f( obj.y ); } -template< typename T > -void visit_named_members( v2 & obj, T f ) { +template< typename F > +void visit_named_members( v2 & obj, F f ) { f( "x", obj.x ); f( "y", obj.y ); } -template< typename T > -void visit_members( v2s32 & obj, T f ) { +template< typename F > +void visit_members( v2s32 & obj, F f ) { f( obj.x ); f( obj.y ); } -template< typename T > -void visit_named_members( v2s32 & obj, T f ) { +template< typename F > +void visit_named_members( v2s32 & obj, F f ) { f( "x", obj.x ); f( "y", obj.y ); } -template< typename T > -void visit_members( m2 & obj, T f ) { +template< typename F > +void visit_members( m2 & obj, F f ) { f( obj.row0 ); f( obj.row1 ); } -template< typename T > -void visit_named_members( m2 & obj, T f ) { +template< typename F > +void visit_named_members( m2 & obj, F f ) { f( "row0", obj.row0 ); f( "row1", obj.row1 ); } -template< typename T > -void visit_members( v3 & obj, T f ) { +template< typename F > +void visit_members( v3 & obj, F f ) { f( obj.x ); f( obj.y ); f( obj.z ); } -template< typename T > -void visit_named_members( v3 & obj, T f ) { +template< typename F > +void visit_named_members( v3 & obj, F f ) { f( "x", obj.x ); f( "y", obj.y ); f( "z", obj.z ); } -template< typename T > -void visit_members( v3u32 & obj, T f ) { +template< typename F > +void visit_members( v3u32 & obj, F f ) { f( obj.x ); f( obj.y ); f( obj.z ); } -template< typename T > -void visit_named_members( v3u32 & obj, T f ) { +template< typename F > +void visit_named_members( v3u32 & obj, F f ) { f( "x", obj.x ); f( "y", obj.y ); f( "z", obj.z ); } -template< typename T > -void visit_members( m3 & obj, T f ) { +template< typename F > +void visit_members( m3 & obj, F f ) { f( obj.row0 ); f( obj.row1 ); f( obj.row2 ); } -template< typename T > -void visit_named_members( m3 & obj, T f ) { +template< typename F > +void visit_named_members( m3 & obj, F f ) { f( "row0", obj.row0 ); f( "row1", obj.row1 ); f( "row2", obj.row2 ); } -template< typename T > -void visit_members( v4 & obj, T f ) { +template< typename F > +void visit_members( v4 & obj, F f ) { f( obj.x ); f( obj.y ); f( obj.z ); f( obj.w ); } -template< typename T > -void visit_named_members( v4 & obj, T f ) { +template< typename F > +void visit_named_members( v4 & obj, F f ) { f( "x", obj.x ); f( "y", obj.y ); f( "z", obj.z ); f( "w", obj.w ); } -template< typename T > -void visit_members( m4 & obj, T f ) { +template< typename F > +void visit_members( m4 & obj, F f ) { f( obj.row0 ); f( obj.row1 ); f( obj.row2 ); f( obj.row3 ); } -template< typename T > -void visit_named_members( m4 & obj, T f ) { +template< typename F > +void visit_named_members( m4 & obj, F f ) { f( "row0", obj.row0 ); f( "row1", obj.row1 ); f( "row2", obj.row2 ); f( "row3", obj.row3 ); } -template< typename T > -void visit_members( quat & obj, T f ) { +template< typename F > +void visit_members( quat & obj, F f ) { f( obj.x ); f( obj.y ); f( obj.z ); f( obj.w ); } -template< typename T > -void visit_named_members( quat & obj, T f ) { +template< typename F > +void visit_named_members( quat & obj, F f ) { f( "x", obj.x ); f( "y", obj.y ); f( "z", obj.z );