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

This commit is contained in:
UbitUmarov
2017-04-30 14:39:20 +01:00
parent b67904a651
commit 0d59a29dc7

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;