Skip to content

fix build warnings #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/impl/MilvusClientImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ MilvusClientImpl::CalcDistance(const CalcDistanceArguments& arguments, DistanceA
kv->set_key("metric");
kv->set_value(arguments.MetricType());

return std::move(rpc_request);
return rpc_request;
};

auto post = [&arguments, &results](const proto::milvus::CalcDistanceResults& response) {
Expand Down
2 changes: 1 addition & 1 deletion src/impl/MilvusConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ createTlsCredentials(const std::string& cert, const std::string& key, const std:
std::string buffer(size, '\0');
fs.seekg(0);
fs.read(&buffer[0], size);
return std::move(buffer);
return buffer;
}
return "";
};
Expand Down
1 change: 1 addition & 0 deletions src/include/milvus/MilvusClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ namespace milvus {
*/
class MilvusClient {
public:
virtual ~MilvusClient() = default;
/**
* Create a MilvusClient instance.
*
Expand Down
2 changes: 1 addition & 1 deletion src/include/milvus/types/DistanceArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ class DistanceArray {
SetFloatDistance(std::vector<std::vector<float>>&& distance_array);

private:
bool is_int_distance_{false};
std::vector<std::vector<int32_t>> int_array_;
std::vector<std::vector<float>> float_array_;
bool is_int_distance_{false};
};

} // namespace milvus
2 changes: 2 additions & 0 deletions src/include/milvus/types/FieldData.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class Field {
virtual size_t
Count() const = 0;

virtual ~Field() = default;

protected:
Field(std::string name, DataType data_type);

Expand Down
2 changes: 1 addition & 1 deletion src/include/milvus/types/IDArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ class IDArray {
StrIDArray() const;

private:
bool is_int_array_{true};
std::vector<int64_t> int_id_array_;
std::vector<std::string> str_id_array_;
bool is_int_array_{true};
};

} // namespace milvus
4 changes: 2 additions & 2 deletions src/include/milvus/types/IndexDesc.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ class IndexDesc {
private:
std::string field_name_;
std::string index_name_;
int64_t index_id_{0};
milvus::MetricType metric_type_{milvus::MetricType::INVALID};
milvus::IndexType index_type_{milvus::IndexType::INVALID};
milvus::MetricType metric_type_{milvus::MetricType::INVALID};
int64_t index_id_{0};
std::unordered_map<std::string, int64_t> extra_params_;
};

Expand Down
Loading