diff options
| author | Amlal <amlal@nekernel.org> | 2025-04-26 08:56:59 +0200 |
|---|---|---|
| committer | Amlal <amlal@nekernel.org> | 2025-04-26 08:56:59 +0200 |
| commit | c791c2de8bdcd89035dd004b73d05217e40e179c (patch) | |
| tree | acfb69b173218dbc42f69ef0c0ab9070f88a3411 /dev/LibCompiler/Parser.h | |
| parent | 7258fbf7c8785a3390441bbbac44d78b2e4facbf (diff) | |
dev: codebase has been improved in terms of cli and consistency.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/LibCompiler/Parser.h')
| -rw-r--r-- | dev/LibCompiler/Parser.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/dev/LibCompiler/Parser.h b/dev/LibCompiler/Parser.h index 04a7fab..64c46d6 100644 --- a/dev/LibCompiler/Parser.h +++ b/dev/LibCompiler/Parser.h @@ -109,7 +109,7 @@ struct SyntaxLeafList final { /// \param haystack base string /// \param needle the string we search for. /// \return if we found it or not. -inline bool find_word(const std::string& haystack, const std::string& needle) noexcept { +inline bool find_word(std::string haystack, std::string needle) noexcept { auto index = haystack.find(needle); // check for needle validity. @@ -131,8 +131,7 @@ inline bool find_word(const std::string& haystack, const std::string& needle) no /// \param haystack /// \param needle /// \return position of needle. -inline std::size_t find_word_range(const std::string& haystack, - const std::string& needle) noexcept { +inline std::size_t find_word_range(std::string haystack, std::string needle) noexcept { auto index = haystack.find(needle); // check for needle validity. |
