Debian Codegraph @

src/LercLib/Defines.h

raw symbols SCIP
1 /*
2 Copyright 2015 - 2026 Esri
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 A local copy of the license and additional notices are located with the
17 source distribution at:
18
19 http://github.com/Esri/lerc/
20
21 Contributors: Thomas Maurer, Lucian Plesea
22 */
23
24 #ifndef LERC_DEFINES_H
25 #define LERC_DEFINES_H
26
27 // This is useful when compiling within GDAL in DEBUG_BOOL mode, where a
28 // MSVCPedanticBool class is used as an alias for the bool type, so as
29 // to catch more easily int/bool misuses, even on Linux
30 // Also for NULL_AS_NULLPTR mode where NULL is aliased to C++11 nullptr
31 #if defined(DEBUG_BOOL) || defined(NULL_AS_NULLPTR)
32 #include "cpl_port.h"
33 #endif
34
35 #define NAMESPACE_LERC_START namespace LercNS {
36 #define NAMESPACE_LERC_END }
37 #define USING_NAMESPACE_LERC using namespace LercNS;
38
39 #define HAVE_LERC1_DECODE
40 //#define ENCODE_VERIFY
41
42 NAMESPACE_LERC_START
43
44 typedef unsigned char Byte;
45
46 //#ifndef max
47 //#define max(a,b) (((a) > (b)) ? (a) : (b))
48 //#endif
49 //
50 //#ifndef min
51 //#define min(a,b) (((a) < (b)) ? (a) : (b))
52 //#endif
53
54 #ifdef SWAPB // define this on big endian system
55
56 // big endian systems no longer supported by Lerc
57
58 #else // SWAPB
59
60 #define SWAP_2(x)
61 #define SWAP_4(x)
62 #define SWAP_8(x)
63
64 #endif // SWAPB
65
66 NAMESPACE_LERC_END
67 #endif