summaryrefslogtreecommitdiff
path: root/common/common.cpp
diff options
context:
space:
mode:
authorHerman Semenov <GermanAizek@yandex.ru>2024-05-17 07:08:49 +0000
committerGitHub <noreply@github.com>2024-05-17 10:08:49 +0300
commit359cbe3f46c90ce6f5151005e411b8fb74f8139e (patch)
treed93e39cdb25858cb7bd74337ff65e24c4520ddca /common/common.cpp
parente18bc6aaf3b547890609ed254ee5248e720e5840 (diff)
ggml-quants, llama : removed excess checks (#7274)
Diffstat (limited to 'common/common.cpp')
-rw-r--r--common/common.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/common.cpp b/common/common.cpp
index 96130ad5..e624fc7f 100644
--- a/common/common.cpp
+++ b/common/common.cpp
@@ -2553,7 +2553,7 @@ void dump_string_yaml_multiline(FILE * stream, const char * prop_name, const cha
size_t pos_start = 0;
size_t pos_found = 0;
- if (!data_str.empty() && (std::isspace(data_str[0]) || std::isspace(data_str.back()))) {
+ if (std::isspace(data_str[0]) || std::isspace(data_str.back())) {
data_str = std::regex_replace(data_str, std::regex("\n"), "\\n");
data_str = std::regex_replace(data_str, std::regex("\""), "\\\"");
data_str = std::regex_replace(data_str, std::regex(R"(\\[^n"])"), R"(\$&)");