Skip to content

Commit 94409d3

Browse files
committed
Fix const-correctness.
1 parent 808b48f commit 94409d3

File tree

2 files changed

+35
-13
lines changed

2 files changed

+35
-13
lines changed

include/symbols.hpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -157,41 +157,41 @@ namespace steppable::prettyPrint
157157
namespace steppable::__internals::symbols
158158
{
159159
/// @brief The because symbol (3 dots in a triangle, Unicode U+2235)
160-
constexpr const std::string_view& BECAUSE = "\u2235";
160+
constexpr std::string_view BECAUSE = "\u2235";
161161
/// @brief The therefore symbol (3 dots in a triangle, Unicode U+2234)
162-
constexpr const std::string_view& THEREFORE = "\u2234";
162+
constexpr std::string_view THEREFORE = "\u2234";
163163

164164
/// @brief The multiply symbol (Unicode U+00D7)
165-
constexpr const std::string_view& MULTIPLY = "\u00D7";
165+
constexpr std::string_view MULTIPLY = "\u00D7";
166166
/// @brief The divide symbol (Unicode U+00F7)
167-
constexpr const std::string_view& DIVIDED_BY = "\u00F7";
167+
constexpr std::string_view DIVIDED_BY = "\u00F7";
168168

169-
constexpr const std::string_view& SURD = "\u221A";
170-
constexpr const std::string_view& COMBINE_MACRON = "\u0305";
169+
constexpr std::string_view SURD = "\u221A";
170+
constexpr std::string_view COMBINE_MACRON = "\u0305";
171171

172172
/// @brief The large dot symbol (Unicode U+25C9)
173-
constexpr const std::string_view& LARGE_DOT = "\u25C9";
174-
constexpr const std::string_view& ABOVE_DOT = "\u02D9";
173+
constexpr std::string_view LARGE_DOT = "\u25C9";
174+
constexpr std::string_view ABOVE_DOT = "\u02D9";
175175

176176
// Subscripts
177177
/**
178178
* @brief The subscript 0 (Unicode U+2080)
179179
* @note This is used to check if a subscript is converted correctly, do not use this in the program.
180180
*/
181-
constexpr const std::string_view& SUB_0 = "\u2080";
181+
constexpr std::string_view SUB_0 = "\u2080";
182182
/**
183183
* @brief The subscript z (Unicode U+2098)
184184
* @note This is used to check if a subscript is converted correctly, do not use this in the program.
185185
*/
186-
constexpr const std::string_view& SUB_Z = "\u1D69";
186+
constexpr std::string_view SUB_Z = "\u1D69";
187187
/**
188188
* @brief The subscript magic number (8272)
189189
* @note This is used to check if a subscript is converted correctly, do not use this in the program.
190190
*/
191191
constexpr int SUB_MAGIC_NUMBER = 8272;
192192

193193
/// @brief A list of subscript characters.
194-
extern const std::array<const std::string_view&, 10>& SUPERSCRIPTS;
194+
extern const std::array<std::string, 10>& SUPERSCRIPTS;
195195

196196
/**
197197
* @brief Create a subscript string from a normal string.
@@ -214,12 +214,12 @@ namespace steppable::__internals::symbols
214214
* @brief The superscript 0 (Unicode U+2070)
215215
* @note This is used to check if a superscript is converted correctly, do not use this in the program.
216216
*/
217-
constexpr const std::string_view& SUP_0 = "\u2070";
217+
constexpr std::string_view SUP_0 = "\u2070";
218218
/**
219219
* @brief The superscript z (Unicode U+1DBB)
220220
* @note This is used to check if a superscript is converted correctly, do not use this in the program.
221221
*/
222-
constexpr const std::string_view& SUP_Z = "\u1DBB";
222+
constexpr std::string_view SUP_Z = "\u1DBB";
223223
/**
224224
* @brief The superscript magic number (8304)
225225
* @note This is used to check if a superscript is converted correctly, do not use this in the program.

tools/generate_changelog.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
#####################################################################################################
2+
# Copyright (c) 2023-2024 NWSOFT #
3+
# #
4+
# Permission is hereby granted, free of charge, to any person obtaining a copy #
5+
# of this software and associated documentation files (the "Software"), to deal #
6+
# in the Software without restriction, including without limitation the rights #
7+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #
8+
# copies of the Software, and to permit persons to whom the Software is #
9+
# furnished to do so, subject to the following conditions: #
10+
# #
11+
# The above copyright notice and this permission notice shall be included in all #
12+
# copies or substantial portions of the Software. #
13+
# #
14+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
15+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
16+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #
17+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
18+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #
19+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
20+
# SOFTWARE. #
21+
#####################################################################################################
22+
123
import subprocess
224
from typing import List
325

0 commit comments

Comments
 (0)