memcpy with a small fixed size is optimized by all contemporary compilers
to a few assembly instructions, but contrary to the pointer casting it
lets the compiler do the right thing.
Details
Details
ctest
Diff Detail
Diff Detail
- Repository
- R293 Baloo
- Branch
- master
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 12904 Build 12922: arc lint + arc unit
Comment Actions
Alternative: return (quint64(devId) << 32) | inode;
Not endian-dependent, like the memcpy solution. Make sure the other side is adapted to match.
Comment Actions
Thats the problem here - the "other side" is an ondisk DB ...
But removing devId from the ID and just keeping inode is on the todo list, we are asking for trouble here anyway in case of 64bit inodes.