File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed
Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,19 @@ limitations under the License.
2222
2323// Likely / unlikely macros
2424#if defined(__GNUC__) || defined(__clang__)
25- #define LIKELY (x ) __builtin_expect(!!(x), 1 )
26- #define UNLIKELY (x ) __builtin_expect(!!(x), 0 )
25+ #ifndef LIKELY
26+ #define LIKELY (x ) __builtin_expect(!!(x), 1 )
27+ #endif
28+ #ifndef UNLIKELY
29+ #define UNLIKELY (x ) __builtin_expect(!!(x), 0 )
30+ #endif
2731#else
28- #define LIKELY (x ) (x)
29- #define UNLIKELY (x ) (x)
32+ #ifndef LIKELY
33+ #define LIKELY (x ) (x)
34+ #endif
35+ #ifndef UNLIKELY
36+ #define UNLIKELY (x ) (x)
37+ #endif
3038#endif
3139
3240namespace kanzi {
Original file line number Diff line number Diff line change @@ -627,7 +627,6 @@ T FileDecompressTask<T>::run()
627627 }
628628
629629 Clock stopClock;
630- static const int DEFAULT_BUFFER_SIZE = 65536 ;
631630 byte* buf = new byte[DEFAULT_BUFFER_SIZE];
632631
633632 try {
Original file line number Diff line number Diff line change @@ -91,6 +91,8 @@ namespace kanzi {
9191 template <class T >
9292 class FileDecompressTask FINAL : public Task<T> {
9393 public:
94+ static const int DEFAULT_BUFFER_SIZE = 65536 ;
95+
9496 FileDecompressTask (const Context& ctx, std::vector<Listener<Event>*>& listeners);
9597
9698 ~FileDecompressTask ();
You can’t perform that action at this time.
0 commit comments