PVS V1039: useless use of multichar constants
Bitshifts and masks are a lot more readable here. Change-Id: I94c8603b75d42456843a0b53bf2a0547aaffdb74 Reviewed-on: https://review.haiku-os.org/c/1669 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
0bc2edbd01
commit
5bc378608a
@@ -41,6 +41,9 @@ All rights reserved.
|
||||
|
||||
namespace BPrivate {
|
||||
|
||||
static const uint32_t kUndoOperation = 'U' << 24;
|
||||
static const uint32_t kDoOperation = 'T' << 24;
|
||||
|
||||
class UndoItem;
|
||||
|
||||
class Undo {
|
||||
@@ -82,21 +85,21 @@ class RenameVolumeUndo : public Undo {
|
||||
static
|
||||
inline bool FSIsUndoMoveMode(uint32 moveMode)
|
||||
{
|
||||
return (moveMode & '\xff\0\0\0') == 'U\0\0\0';
|
||||
return (moveMode & 0xFF000000) == kUndoOperation;
|
||||
}
|
||||
|
||||
|
||||
static
|
||||
inline uint32 FSUndoMoveMode(uint32 moveMode)
|
||||
{
|
||||
return (moveMode & ~'\xff\0\0\0') | 'U\0\0\0';
|
||||
return (moveMode & 0x00FFFFFF) | kUndoOperation;
|
||||
}
|
||||
|
||||
|
||||
static
|
||||
inline uint32 FSMoveMode(uint32 moveMode)
|
||||
{
|
||||
return (moveMode & ~'\xff\0\0\0') | 'T\0\0\0';
|
||||
return (moveMode & 0x00FFFFFF | kDoOperation;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user