Fairly simple, but the inline optimiser doesn't seem to process string conditions such as; if (str == "")
As a result code that behaves differently based on a provided string won't optimise as expected.
For example the following script:
-----------------------------------
// pragma inline
string function(string str) {
if (str != "") return llGetTimestamp();
else return llGetObjectName();
}
default {
state_entry() {
// First Call
llOwnerSay(function("Bob")); // Should be llGetTimestamp()
// Second Call
llOwnerSay(function("")); // Should be llGetObjectName()
}
}
-----------------------------------
Should optimise to something like:
-----------------------------------
default {
state_entry() {
// First Call
string _ret0 = llGetTimestamp();
llOwnerSay(_ret0); // Should be llGetTimestamp()
// Second Call
string _ret1 = llGetObjectName();
llOwnerSay(_ret1); // Should be llGetObjectName()
}
}
-----------------------------------
It does not. This is the not the case for integer or float conditionals however which optimise as expected.