CodenameOne icon indicating copy to clipboard operation
CodenameOne copied to clipboard

more IOS code bloat

Open ddyer0 opened this issue 4 years ago • 2 comments

I noticed that you define setter functions for static final variables

static final String ConfirmSwapDescription = "Click on Done to confirm swapping colors";

becomes

#define get_static_arimaa_ArimaaConstants_ArimaaState_ConfirmSwapDescription(threadStateArgument) get_static_online_game_BaseBoard_BoardState_ConfirmSwapDescription(threadStateArgument) #define set_static_arimaa_ArimaaConstants_ArimaaState_ConfirmSwapDescription(threadStateArgument, valueArgument) set_static_online_game_BaseBoard_BoardState_ConfirmSwapDescription(threadStateArgument, valueArgument)

ddyer0 avatar Nov 10 '21 22:11 ddyer0

I haven't checked, but i imagine that setter might be used for the initialization of the variable value, and removing the setter would just complicate things - creating a special case for initializing final vars.

shannah avatar Nov 10 '21 23:11 shannah

Actually, it looks like you do not create a setter function at all, only the unusable setter macros

grep: Images.xcassets: Invalid request code chess_ChessBoard.h:#define get_static_chess_ChessBoard_ChessMoveDescription(threadStateArgument) get_static_chess_ChessConstants_ChessMoveDescription(threadStateArgument) chess_ChessBoard.h:#define set_static_chess_ChessBoard_ChessMoveDescription(threadStateArgument, valueArgument) set_static_chess_ChessConstants_ChessMoveDescription(threadStateArgument, valueArgument) chess_ChessCell.h:#define get_static_chess_ChessCell_ChessMoveDescription(threadStateArgument) get_static_chess_ChessConstants_ChessMoveDescription(threadStateArgument) chess_ChessCell.h:#define set_static_chess_ChessCell_ChessMoveDescription(threadStateArgument, valueArgument) set_static_chess_ChessConstants_ChessMoveDescription(threadStateArgument, valueArgument) chess_ChessChip.h:#define get_static_chess_ChessChip_ChessMoveDescription(threadStateArgument) get_static_chess_ChessConstants_ChessMoveDescription(threadStateArgument) chess_ChessChip.h:#define set_static_chess_ChessChip_ChessMoveDescription(threadStateArgument, valueArgument) set_static_chess_ChessConstants_ChessMoveDescription(threadStateArgument, valueArgument) chess_ChessConstants.h:extern JAVA_OBJECT get_static_chess_ChessConstants_ChessMoveDescription(); chess_ChessConstants.m:JAVA_OBJECT get_static_chess_ChessConstants_ChessMoveDescription(CODENAME_ONE_THREAD_STATE) { chess_ChessMovespec.h:#define get_static_chess_ChessMovespec_ChessMoveDescription(threadStateArgument) get_static_chess_ChessConstants_ChessMoveDescription(threadStateArgument) chess_ChessMovespec.h:#define set_static_chess_ChessMovespec_ChessMoveDescription(threadStateArgument, valueArgument) set_static_chess_ChessConstants_ChessMoveDescription(threadStateArgument, valueArgument) chess_ChessPlay.h:#define get_static_chess_ChessPlay_ChessMoveDescription(threadStateArgument) get_static_chess_ChessConstants_ChessMoveDescription(threadStateArgument) chess_ChessPlay.h:#define set_static_chess_ChessPlay_ChessMoveDescription(threadStateArgument, valueArgument) set_static_chess_ChessConstants_ChessMoveDescription(threadStateArgument, valueArgument) chess_ChessViewer.h:#define get_static_chess_ChessViewer_ChessMoveDescription(threadStateArgument) get_static_chess_ChessConstants_ChessMoveDescription(threadStateArgument) chess_ChessViewer.h:#define set_static_chess_ChessViewer_ChessMoveDescription(threadStateArgument, valueArgument) set_static_chess_ChessConstants_ChessMoveDescription(threadStateArgument, valueArgument)

ddyer0 avatar Nov 11 '21 21:11 ddyer0