Skip to content

Commit 720c45c

Browse files
authored
rename 'content' variable to avoid duplicates (#475)
1 parent c47b3ac commit 720c45c

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/pq_flash_index.cpp

+13-10
Original file line numberDiff line numberDiff line change
@@ -779,8 +779,8 @@ int PQFlashIndex<T, LabelT>::load_from_separate_paths(uint32_t num_threads, cons
779779
#ifdef EXEC_ENV_OLS
780780
if (files.fileExists(labels_file))
781781
{
782-
FileContent &content = files.getContent(labels_file);
783-
std::stringstream infile(std::string((const char *)content._content, content._size));
782+
FileContent &content_labels = files.getContent(labels_file);
783+
std::stringstream infile(std::string((const char *)content_labels._content, content_labels._size));
784784
#else
785785
if (file_exists(labels_file))
786786
{
@@ -798,8 +798,8 @@ int PQFlashIndex<T, LabelT>::load_from_separate_paths(uint32_t num_threads, cons
798798
#endif
799799

800800
#ifdef EXEC_ENV_OLS
801-
FileContent &content = files.getContent(labels_map_file);
802-
std::stringstream map_reader(std::string((const char *)content._content, content._size));
801+
FileContent &content_labels_map = files.getContent(labels_map_file);
802+
std::stringstream map_reader(std::string((const char *)content_labels_map._content, content_labels_map._size));
803803
#else
804804
std::ifstream map_reader(labels_map_file);
805805
#endif
@@ -812,8 +812,9 @@ int PQFlashIndex<T, LabelT>::load_from_separate_paths(uint32_t num_threads, cons
812812
#ifdef EXEC_ENV_OLS
813813
if (files.fileExists(labels_to_medoids))
814814
{
815-
FileContent &content = files.getContent(labels_to_medoids);
816-
std::stringstream medoid_stream(std::string((const char *)content._content, content._size));
815+
FileContent &content_labels_to_meoids = files.getContent(labels_to_medoids);
816+
std::stringstream medoid_stream(
817+
std::string((const char *)content_labels_to_meoids._content, content_labels_to_meoids._size));
817818
#else
818819
if (file_exists(labels_to_medoids))
819820
{
@@ -852,8 +853,9 @@ int PQFlashIndex<T, LabelT>::load_from_separate_paths(uint32_t num_threads, cons
852853
#ifdef EXEC_ENV_OLS
853854
if (files.fileExists(univ_label_file))
854855
{
855-
FileContent &content = files.getContent(univ_label_file);
856-
std::stringstream universal_label_reader(std::string((const char *)content._content, content._size));
856+
FileContent &content_univ_label = files.getContent(univ_label_file);
857+
std::stringstream universal_label_reader(
858+
std::string((const char *)content_univ_label._content, content_univ_label._size));
857859
#else
858860
if (file_exists(univ_label_file))
859861
{
@@ -872,8 +874,9 @@ int PQFlashIndex<T, LabelT>::load_from_separate_paths(uint32_t num_threads, cons
872874
#ifdef EXEC_ENV_OLS
873875
if (files.fileExists(dummy_map_file))
874876
{
875-
FileContent &content = files.getContent(dummy_map_file);
876-
std::stringstream dummy_map_stream(std::string((const char *)content._content, content._size));
877+
FileContent &content_dummy_map = files.getContent(dummy_map_file);
878+
std::stringstream dummy_map_stream(
879+
std::string((const char *)content_dummy_map._content, content_dummy_map._size));
877880
#else
878881
if (file_exists(dummy_map_file))
879882
{

0 commit comments

Comments
 (0)