From 0d59a29dc7c6f732da266a4ed4fddb5b39521ddf Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 30 Apr 2017 14:39:20 +0100 Subject: save some nanoseconds if unfolding will not change anything ( export default mks it rare, but looks nice) --- OpenSim/Framework/PermissionsUtil.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/PermissionsUtil.cs b/OpenSim/Framework/PermissionsUtil.cs index aba8320..cf93323 100644 --- a/OpenSim/Framework/PermissionsUtil.cs +++ b/OpenSim/Framework/PermissionsUtil.cs @@ -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; -- cgit v1.1