Some micro-optimizations.
- [AV]sitA: Compute loading progress percentage without converting to float. Remove some 'else' clauses, adding 'return' where appropriate. That required moving the retrieval of the next notecard line near the top. A block has been left indented for clarity, and will be unindented in the next commit. - [AV]prop: Remove some 'else' clauses, adding 'return' where appropriate. A block has been left indented for clarity, and will be unindented in the next commit. - [AV]Xcite!: Change (string)llList2Integer to llList2String, after verifying that the elements in the list are always integers, and therefore this can't cause problems. - [AV]root-RLV-extra: Remove unused event. - [AV]faces: Change llListReplaceList with a replacement of [] to llDeleteSubList, to save one argument. Remove unnecessary 'else'. - [AV]sequence: Comment out unused condition. It would be removed by the optimizer anyway, but this will hopefully help with clarity. - AVpos-shifter: Change var++ to ++var (the optimizer would also do this anyway).
This commit is contained in:
parent
65c067cc30
commit
7482550bef
8 changed files with 106 additions and 68 deletions
|
@ -433,9 +433,11 @@ state running
|
|||
|
||||
changed(integer change)
|
||||
{
|
||||
/*
|
||||
if (change & CHANGED_LINK)
|
||||
{
|
||||
}
|
||||
*/
|
||||
if (change & CHANGED_INVENTORY)
|
||||
{
|
||||
if (llGetInventoryKey(notecard_name) != notecard_key || get_number_of_scripts() != llGetListLength(SITTERS))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue