From 12c7f9be7f687f3078e313b8def67f878a00b9bb Mon Sep 17 00:00:00 2001 From: Shunsuke Kanda Date: Sat, 3 Jul 2021 21:11:40 +0900 Subject: [PATCH] minor --- README.md | 8 ++++---- include/xcdat/trie.hpp | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2df45b1..e2ef177 100644 --- a/README.md +++ b/README.md @@ -488,11 +488,11 @@ Trie mmap(const char* address); //! Load the trie dictionary from the file. template -Trie load(std::string_view filepath); +Trie load(const std::string& filepath); //! Save the trie dictionary to the file and returns the file size in bytes. template -std::uint64_t save(const Trie& idx, std::string_view filepath); +std::uint64_t save(const Trie& idx, const std::string& filepath); //! Get the dictionary size in bytes. template @@ -500,10 +500,10 @@ std::uint64_t memory_in_bytes(const Trie& idx); //! Get the flag indicating the trie type, embedded by the function 'save'. //! The flag corresponds to trie::l1_bits and will be used to detect the trie type from the file. -std::uint32_t get_flag(std::string_view filepath); +std::uint32_t get_flag(const std::string& filepath); //! Load the keywords from the file. -std::vector load_strings(std::string_view filepath, char delim = '\n'); +std::vector load_strings(const std::string& filepath, char delim = '\n'); ``` ## Performance diff --git a/include/xcdat/trie.hpp b/include/xcdat/trie.hpp index c207c99..c6694e5 100644 --- a/include/xcdat/trie.hpp +++ b/include/xcdat/trie.hpp @@ -3,6 +3,7 @@ #include #include #include +#include #include "trie_builder.hpp"