mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
enhance: [2.4] Use clang-format-12 to perform cpp check (#35119)
clang-format version is 12 after upgrading to ubuntu 22.04, this PR change formating script to use clang-format-12 and fix existing problems Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
c340f387cf
commit
94c86327ae
@ -7,7 +7,7 @@ fi
|
||||
CorePath=$1
|
||||
|
||||
formatThis() {
|
||||
find "$1" | grep -E "(*\.cpp|*\.h|*\.cc)$" | grep -v "gen_tools/templates" | grep -v "\.pb\." | grep -v "tantivy-binding.h" | xargs clang-format-10 -i
|
||||
find "$1" | grep -E "(*\.cpp|*\.h|*\.cc)$" | grep -v "gen_tools/templates" | grep -v "\.pb\." | grep -v "tantivy-binding.h" | xargs clang-format-12 -i
|
||||
}
|
||||
|
||||
formatThis "${CorePath}/src"
|
||||
|
||||
@ -491,10 +491,9 @@ DiskFileManagerImpl::CacheRawDataToDisk(std::vector<std::string> remote_files) {
|
||||
if (data_type == milvus::DataType::VECTOR_SPARSE_FLOAT) {
|
||||
dim = std::max(
|
||||
dim,
|
||||
(uint32_t)(
|
||||
std::dynamic_pointer_cast<FieldData<SparseFloatVector>>(
|
||||
field_data)
|
||||
->Dim()));
|
||||
(uint32_t)(std::dynamic_pointer_cast<
|
||||
FieldData<SparseFloatVector>>(field_data)
|
||||
->Dim()));
|
||||
auto sparse_rows =
|
||||
static_cast<const knowhere::sparse::SparseRow<float>*>(
|
||||
field_data->Data());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user