From d81d3bfa4cd5b8397eaa6d91f8b1fe5af5244888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 16 Sep 2003 13:20:43 +0000 Subject: [PATCH] Added B_SSIZE_T_TYPE, B_SIZE_T_TYPE, B_OFF_T_TYPE to compareKeys(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4713 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp b/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp index d79f917637..52672f6984 100644 --- a/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp +++ b/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp @@ -2064,38 +2064,35 @@ compareKeys(type_code type,const void *key1, int keyLength1, const void *key2, i return result; } + case B_SSIZE_T_TYPE: case B_INT32_TYPE: return *(int32 *)key1 - *(int32 *)key2; - + + case B_SIZE_T_TYPE: case B_UINT32_TYPE: - { if (*(uint32 *)key1 == *(uint32 *)key2) return 0; else if (*(uint32 *)key1 > *(uint32 *)key2) return 1; return -1; - } - + + case B_OFF_T_TYPE: case B_INT64_TYPE: - { if (*(int64 *)key1 == *(int64 *)key2) return 0; else if (*(int64 *)key1 > *(int64 *)key2) return 1; return -1; - } case B_UINT64_TYPE: - { if (*(uint64 *)key1 == *(uint64 *)key2) return 0; else if (*(uint64 *)key1 > *(uint64 *)key2) return 1; return -1; - } case B_FLOAT_TYPE: {