Skip to content

Commit 774615b

Browse files
committed
Corrected acknowledgements
1 parent 2470d55 commit 774615b

File tree

5 files changed

+43
-37
lines changed

5 files changed

+43
-37
lines changed

ACKNOWLEDGEMENTS.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
The Unicode functions included in this library have ben adapted from
2+
[utfcpp](https://github.com/nemtrif/utfcpp):
3+
4+
Copyright 2006 Nemanja Trifunovic
5+
6+
Permission is hereby granted, free of charge, to any person or organization
7+
obtaining a copy of the software and accompanying documentation covered by
8+
this license (the "Software") to use, reproduce, display, distribute,
9+
execute, and transmit the Software, and to prepare derivative works of the
10+
Software, and to permit third-parties to whom the Software is furnished to
11+
do so, all subject to the following:
12+
The copyright notices in the Software and this entire statement, including
13+
the above license grant, this restriction and the following disclaimer,
14+
must be included in all copies of the Software, in whole or in part, and
15+
all derivative works of the Software, unless such copies or derivative
16+
works are solely in the form of machine-executable object code generated by
17+
a source language processor.
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
21+
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
22+
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
23+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24+
DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,16 @@ the install command as an administrator (e.g. on Linux as `sudo`).
179179

180180
## Dependencies
181181

182-
This library uses [expected](https://github.com/TartanLlama/expected)
183-
and a modified implementation of [utfcpp](https://github.com/nemtrif/utfcpp).
182+
This library uses [expected](https://github.com/TartanLlama/expected).
184183

185184
The tests use [Catch2](https://github.com/catchorg/catch2),
186185
[nlohmann-json](https://github.com/nlohmann/json) and
187186
[fmtlib](https://github.com/fmtlib/fmt).
188187

188+
## Acknowledgements
189+
190+
This library includes a modified implementation of [utfcpp](https://github.com/nemtrif/utfcpp).
191+
189192
## Requirements
190193

191194
This library has been tested using the following platforms and

include/skyr/v1/percent_encoding/percent_encoded_char.hpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,6 @@ struct percent_encoded_char {
102102
'%',
103103
details::hex_to_letter(static_cast<char>((static_cast<unsigned>(byte) >> 4u) & 0x0fu)),
104104
details::hex_to_letter(static_cast<char>(static_cast<unsigned >(byte) & 0x0fu))} {}
105-
///
106-
percent_encoded_char(const percent_encoded_char &) = default;
107-
///
108-
percent_encoded_char(percent_encoded_char &&) noexcept = default;
109-
///
110-
percent_encoded_char &operator=(const percent_encoded_char &) = default;
111-
///
112-
percent_encoded_char &operator=(percent_encoded_char &&) noexcept = default;
113-
///
114-
~percent_encoded_char() = default;
115105

116106
///
117107
/// \return

include/skyr/v1/unicode/code_points/u16.hpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,6 @@ class u16_code_point_t {
3232
constexpr u16_code_point_t(char16_t lead_value, char16_t trail_value)
3333
: code_point_((lead_value << 10U) + trail_value + constants::surrogates::offset) {}
3434

35-
///
36-
constexpr u16_code_point_t(const u16_code_point_t &) = default;
37-
///
38-
constexpr u16_code_point_t(u16_code_point_t &&) noexcept = default;
39-
///
40-
u16_code_point_t &operator=(const u16_code_point_t &) = default;
41-
///
42-
u16_code_point_t &operator=(u16_code_point_t &&) noexcept = default;
43-
///
44-
~u16_code_point_t() = default;
45-
4635
///
4736
/// \return
4837
[[nodiscard]] constexpr auto is_surrogate_pair() const noexcept {

include/skyr/v1/unicode/core.hpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,28 @@ namespace unicode {
1717
///
1818
/// \param octet
1919
/// \return
20-
constexpr auto mask8(uint8_t octet) {
20+
constexpr inline auto mask8(uint8_t octet) {
2121
return static_cast<uint8_t>(0xffu & octet);
2222
}
2323

2424
///
2525
/// \param value
2626
/// \return
27-
constexpr auto mask16(char16_t value) {
27+
constexpr inline auto mask16(char16_t value) {
2828
return static_cast<char16_t>(u'\xffff' & value);
2929
}
3030

3131
///
3232
/// \param octet
3333
/// \return
34-
constexpr auto is_trail(uint8_t octet) {
34+
constexpr inline auto is_trail(uint8_t octet) {
3535
return ((mask8(octet) >> 6u) == 0x2u);
3636
}
3737

3838
///
3939
/// \param code_point
4040
/// \return
41-
constexpr auto is_lead_surrogate(char16_t code_point) {
41+
constexpr inline auto is_lead_surrogate(char16_t code_point) {
4242
return
4343
(code_point >= constants::surrogates::lead_min) &&
4444
(code_point <= constants::surrogates::lead_max);
@@ -47,7 +47,7 @@ constexpr auto is_lead_surrogate(char16_t code_point) {
4747
///
4848
/// \param value
4949
/// \return
50-
constexpr auto is_trail_surrogate(char16_t value) {
50+
constexpr inline auto is_trail_surrogate(char16_t value) {
5151
return
5252
(value >= constants::surrogates::trail_min) &&
5353
(value <= constants::surrogates::trail_max);
@@ -56,7 +56,7 @@ constexpr auto is_trail_surrogate(char16_t value) {
5656
///
5757
/// \param value
5858
/// \return
59-
constexpr auto is_surrogate(char16_t value) {
59+
constexpr inline auto is_surrogate(char16_t value) {
6060
return
6161
(value >= constants::surrogates::lead_min) &&
6262
(value <= constants::surrogates::trail_max);
@@ -65,7 +65,7 @@ constexpr auto is_surrogate(char16_t value) {
6565
/// Tests if the code point is a valid value.
6666
/// \param code_point
6767
/// \return \c true if it has a valid value, \c false otherwise
68-
constexpr auto is_valid_code_point(char32_t code_point) {
68+
constexpr inline auto is_valid_code_point(char32_t code_point) {
6969
return
7070
(code_point <= constants::code_points::max) &&
7171
!is_surrogate(static_cast<char16_t>(code_point));
@@ -74,7 +74,7 @@ constexpr auto is_valid_code_point(char32_t code_point) {
7474
/// Returns the size of the sequnce given the lead octet value.
7575
/// \param lead_value
7676
/// \return 1, 2, 3 or 4
77-
constexpr auto sequence_length(uint8_t lead_value) {
77+
constexpr inline auto sequence_length(uint8_t lead_value) {
7878
auto lead = mask8(lead_value);
7979
if (lead < 0x80u) {
8080
return 1;
@@ -164,7 +164,7 @@ template<typename OctetIterator>
164164
auto from_two_byte_sequence(OctetIterator first) -> tl::expected<sequence_state<OctetIterator>, std::error_code> {
165165
using result_type = tl::expected<sequence_state<OctetIterator>, std::error_code>;
166166

167-
auto set_code_point = [](auto state) -> result_type {
167+
constexpr static auto set_code_point = [](auto state) -> result_type {
168168
return update_value(
169169
state,
170170
((state.value << 6) & 0x7ff) + (*state.it & 0x3f));
@@ -186,13 +186,13 @@ template<typename OctetIterator>
186186
auto from_three_byte_sequence(OctetIterator first) -> tl::expected<sequence_state<OctetIterator>, std::error_code> {
187187
using result_type = tl::expected<sequence_state<OctetIterator>, std::error_code>;
188188

189-
auto update_code_point_from_second_byte = [](auto state) -> result_type {
189+
constexpr static auto update_code_point_from_second_byte = [](auto state) -> result_type {
190190
return update_value(
191191
state,
192192
((state.value << 12) & 0xffff) + ((mask8(*state.it) << 6) & 0xfff));
193193
};
194194

195-
auto set_code_point = [](auto state) -> result_type {
195+
constexpr static auto set_code_point = [](auto state) -> result_type {
196196
return update_value(
197197
state,
198198
state.value + (*state.it & 0x3f));
@@ -215,19 +215,19 @@ template<typename OctetIterator>
215215
auto from_four_byte_sequence(OctetIterator first) -> tl::expected<sequence_state<OctetIterator>, std::error_code> {
216216
using result_type = tl::expected<sequence_state<OctetIterator>, std::error_code>;
217217

218-
auto update_code_point_from_second_byte = [](auto state) -> result_type {
218+
constexpr static auto update_code_point_from_second_byte = [](auto state) -> result_type {
219219
return update_value(
220220
state,
221221
((state.value << 18) & 0x1fffff) + ((mask8(*state.it) << 12) & 0x3ffff));
222222
};
223223

224-
auto update_code_point_from_third_byte = [](auto state) -> result_type {
224+
constexpr static auto update_code_point_from_third_byte = [](auto state) -> result_type {
225225
return update_value(
226226
state,
227227
state.value + ((mask8(*state.it) << 6) & 0xfff));
228228
};
229229

230-
auto set_code_point = [](auto state) -> result_type {
230+
constexpr static auto set_code_point = [](auto state) -> result_type {
231231
return update_value(
232232
state,
233233
state.value + (*state.it & 0x3f));

0 commit comments

Comments
 (0)