save some nanoseconds if unfolding will not change anything ( export default mks it rare, but looks nice)

httptests
UbitUmarov 2017-04-30 14:39:20 +01:00
parent b67904a651
commit 0d59a29dc7
1 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ namespace OpenSim.Framework
public static void ApplyFoldedPermissions(uint foldedSourcePerms, ref uint targetPerms)
{
uint folded = foldedSourcePerms & (uint)PermissionMask.FoldedMask;
if(folded == 0) // invalid we need to ignore
if(folded == 0 || folded == (uint)PermissionMask.FoldedMask) // invalid we need to ignore, or nothing to do
return;
folded <<= (int)PermissionMask.FoldingShift;
@ -83,7 +83,7 @@ namespace OpenSim.Framework
public static void ApplyNoModFoldedPermissions(uint foldedSourcePerms, ref uint target)
{
uint folded = foldedSourcePerms & (uint)PermissionMask.FoldedMask;
if(folded == 0) // invalid we need to ignore
if(folded == 0 || folded == (uint)PermissionMask.FoldedMask) // invalid we need to ignore, or nothing to do
return;
folded <<= (int)PermissionMask.FoldingShift;