Skip to content

General - SQF Improvements#9698

Merged
LinkIsGrim merged 19 commits intoacemod:masterfrom
BrettMayson:sqf_if_select
Feb 4, 2024
Merged

General - SQF Improvements#9698
LinkIsGrim merged 19 commits intoacemod:masterfrom
BrettMayson:sqf_if_select

Conversation

@BrettMayson
Copy link
Copy Markdown
Member

@BrettMayson BrettMayson commented Dec 31, 2023

When merged this pull request will:

  • Use [false, true] select (condition) when using constants, supposedly 35% faster
  • Don't use typeName on constants (only in included BI code)
  • Use str ... instead of format ["%1", ...]
  • Use parseNumber ... instead of [0, 1] select ...

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

@BrettMayson BrettMayson changed the title Gemeral - Use select for ifs returning constants Gemeral - SQF Improvements Dec 31, 2023
Comment thread addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf Outdated
Comment thread addons/fortify/functions/fnc_createObjectMarker.sqf Outdated
@LinkIsGrim LinkIsGrim added the kind/optimization Release Notes: **IMPROVED:** label Dec 31, 2023
@BrettMayson BrettMayson changed the title Gemeral - SQF Improvements General - SQF Improvements Dec 31, 2023
Comment thread addons/towing/functions/fnc_addRopeToVehicle.sqf Outdated
Comment thread addons/common/XEH_postInit.sqf Outdated
Comment thread addons/weather/functions/fnc_getApproximateAirTemp.sqf Outdated
Comment thread addons/artillerytables/functions/fnc_rangeTableOpen.sqf Outdated
Comment thread addons/common/functions/fnc_stringToColoredText.sqf Outdated
@jonpas
Copy link
Copy Markdown
Member

jonpas commented Jan 7, 2024

I don't like that we are changing includes. HEMTT should have an option to ignore warnings in includes.

Comment thread addons/common/functions/fnc_watchVariable.sqf Outdated
Comment thread addons/common/functions/fnc_watchVariable.sqf Outdated
Comment thread addons/recoil/functions/fnc_camshake.sqf Outdated
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Comment thread addons/xm157/functions/fnc_weaponInfo_draw.sqf Outdated
@PabstMirror PabstMirror added this to the 3.16.4 milestone Jan 22, 2024
@LinkIsGrim LinkIsGrim merged commit 1e404cf into acemod:master Feb 4, 2024
@BrettMayson BrettMayson deleted the sqf_if_select branch March 26, 2024 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/optimization Release Notes: **IMPROVED:**

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants