storcach.cxx (73d9b18a) | storcach.cxx (c1e8cc3a) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 213 unchanged lines hidden (view full) --- 222 223/*======================================================================== 224 * 225 * highbit():= log2() + 1 (complexity O(1)) 226 * 227 *======================================================================*/ 228static int highbit(sal_Size n) 229{ | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 213 unchanged lines hidden (view full) --- 222 223/*======================================================================== 224 * 225 * highbit():= log2() + 1 (complexity O(1)) 226 * 227 *======================================================================*/ 228static int highbit(sal_Size n) 229{ |
230 register int k = 1; | 230 int k = 1; |
231 232 if (n == 0) 233 return (0); 234#if SAL_TYPES_SIZEOFLONG == 8 235 if (n & 0xffffffff00000000ul) 236 k |= 32, n >>= 32; 237#endif 238 if (n & 0xffff0000) --- 182 unchanged lines hidden (view full) --- 421 // 422 rtl_freeMemory (old_table); 423 } 424 } 425} 426 427Entry * PageCache_Impl::lookup_Impl (Entry * entry, sal_uInt32 nOffset) 428{ | 231 232 if (n == 0) 233 return (0); 234#if SAL_TYPES_SIZEOFLONG == 8 235 if (n & 0xffffffff00000000ul) 236 k |= 32, n >>= 32; 237#endif 238 if (n & 0xffff0000) --- 182 unchanged lines hidden (view full) --- 421 // 422 rtl_freeMemory (old_table); 423 } 424 } 425} 426 427Entry * PageCache_Impl::lookup_Impl (Entry * entry, sal_uInt32 nOffset) 428{ |
429 register int lookups = 0; | 429 int lookups = 0; |
430 while (entry != 0) 431 { 432 if (entry->m_nOffset == nOffset) 433 break; 434 435 lookups += 1; 436 entry = entry->m_pNext; 437 } --- 120 unchanged lines hidden --- | 430 while (entry != 0) 431 { 432 if (entry->m_nOffset == nOffset) 433 break; 434 435 lookups += 1; 436 entry = entry->m_pNext; 437 } --- 120 unchanged lines hidden --- |