diff --git a/common/arg.cpp b/common/arg.cpp index dede335fb..d163c46e6 100644 --- a/common/arg.cpp +++ b/common/arg.cpp @@ -376,7 +376,7 @@ static std::vector parse_device_list(const std::string & val return devices; } -static void add_rpc_devices(std::string servers) { +static void add_rpc_devices(const std::string & servers) { auto rpc_servers = string_split(servers, ','); if (rpc_servers.empty()) { throw std::invalid_argument("no RPC servers specified"); diff --git a/ggml/src/gguf.cpp b/ggml/src/gguf.cpp index ab13669c5..8fc446308 100644 --- a/ggml/src/gguf.cpp +++ b/ggml/src/gguf.cpp @@ -1153,7 +1153,7 @@ struct gguf_writer { buf.insert(buf.end(), val.begin(), val.end()); } - void write(const bool & val) const { + void write(const bool val) const { const int8_t val8 = val ? 1 : 0; write(val8); } @@ -1172,11 +1172,11 @@ struct gguf_writer { write(std::string(val)); } - void write(const enum ggml_type & val) const { + void write(const enum ggml_type val) const { write(int32_t(val)); } - void write(const enum gguf_type & val) const { + void write(const enum gguf_type val) const { write(int32_t(val)); }