Skip to content

Commit b5ecb09

Browse files
committed
fixed scaling
1 parent aae5ee2 commit b5ecb09

File tree

2 files changed

+1
-34
lines changed

2 files changed

+1
-34
lines changed

JxlCoder.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'JxlCoder'
3-
s.version = '1.5.1'
3+
s.version = '1.5.2'
44
s.summary = 'JXL coder for iOS and MacOS'
55
s.description = 'Provides support for JXL files in iOS and MacOS'
66
s.homepage = 'https://github.com/awxkee/jxl-coder-swift'

Sources/jxlc/algo/common.h

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@
66
#ifndef LIB_JXL_BASE_COMMON_H_
77
#define LIB_JXL_BASE_COMMON_H_
88

9-
// Shared constants and helper functions.
10-
11-
#include <cstddef>
12-
#include <cstdint>
13-
#include <cstdio>
149
#include <memory>
15-
#include <string>
1610

1711
namespace coder {
1812
// Some enums and typedefs used by more than one header file.
@@ -56,38 +50,11 @@ namespace coder {
5650
return static_cast<T>(multiplier * kPi);
5751
}
5852

59-
// Prior to C++14 (i.e. C++11): provide our own make_unique
60-
#if __cplusplus < 201402L
61-
template <typename T, typename... Args>
62-
std::unique_ptr<T> make_unique(Args&&... args) {
63-
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
64-
}
65-
#else
66-
using std::make_unique;
67-
#endif
68-
6953
template<typename T>
7054
inline T Clamp1(T val, T low, T hi) {
7155
return val < low ? low : val > hi ? hi : val;
7256
}
7357

74-
// conversion from integer to string.
75-
template<typename T>
76-
std::string ToString(T n) {
77-
char data[32] = {};
78-
if (T(0.1) != T(0)) {
79-
// float
80-
snprintf(data, sizeof(data), "%g", static_cast<double>(n));
81-
} else if (T(-1) > T(0)) {
82-
// unsigned
83-
snprintf(data, sizeof(data), "%llu", static_cast<unsigned long long>(n));
84-
} else {
85-
// signed
86-
snprintf(data, sizeof(data), "%lld", static_cast<long long>(n));
87-
}
88-
return data;
89-
}
90-
9158
} // namespace jxl
9259

9360
#endif // LIB_JXL_BASE_COMMON_H_

0 commit comments

Comments
 (0)