Artifact 22d34644775a66d43b7b732c9ec106763341eaaa2cdfe6befc5b15754c92dfd6:
- File src/tools.mm — part of check-in [6f5dd50626] at 2025-03-08 02:38:40 on branch trunk — Improve clang-format (user: js, size: 424) [annotate] [blame] [check-ins using]
// implementation of generic tools #include "tools.h" #include <new> ///////////////////////// misc tools /////////////////////// void endianswap( void *memory, int stride, int length) // little indians as storage format { if (*((char *)&stride)) return; loop(w, length) loop(i, stride / 2) { uchar *p = (uchar *)memory + w * stride; uchar t = p[i]; p[i] = p[stride - i - 1]; p[stride - i - 1] = t; } }