From d1c9bd68a0ce0d71072fcf6d17d0506a539e9ba6 Mon Sep 17 00:00:00 2001 From: Norbert Wenzel Date: Sun, 27 Oct 2019 08:34:13 +0100 Subject: [PATCH] Remove unused overloads that do not compile The `ReadHeader()` overloads taking a character pointer (filename) as a first parameter instead of a `FILE*` directly do not compile, as they are calling an overload of `ReadHeader(FILE*)` which does not exist. Clang does not seem to care as these functions are unused when compiling MeshLab (and therefore also VCGLib) but GCC tries to compile these (unused) functions and rightly fails. This commit simply removes the overloads taking a filename (`char*`). They are in a header, but since they should fail to compile on *any* platform I guess it is safe to remove these overloads, as I do not expect them to be used anywhere successfully. --- wrap/io_trimesh/import_nvm.h | 9 --------- wrap/io_trimesh/import_out.h | 9 --------- 2 files changed, 18 deletions(-) diff --git a/wrap/io_trimesh/import_nvm.h b/wrap/io_trimesh/import_nvm.h index c9e8fe22..9741dca8 100644 --- a/wrap/io_trimesh/import_nvm.h +++ b/wrap/io_trimesh/import_nvm.h @@ -85,15 +85,6 @@ static bool ReadHeader(FILE *fp,unsigned int &num_cams){ return true; } -static bool ReadHeader(const char * filename,unsigned int &/*num_cams*/, unsigned int &/*num_points*/){ - FILE *fp = fopen(filename, "r"); - if(!fp) return false; - ReadHeader(fp); - fclose(fp); - return true; -} - - static int Open( OpenMeshType &m, std::vector > & shots, std::vector & image_filenames, const char * filename, CallBackPos *cb=0) diff --git a/wrap/io_trimesh/import_out.h b/wrap/io_trimesh/import_out.h index 01331bc5..88fabb10 100644 --- a/wrap/io_trimesh/import_out.h +++ b/wrap/io_trimesh/import_out.h @@ -85,15 +85,6 @@ static bool ReadHeader(FILE *fp,unsigned int &num_cams, unsigned int &num_points return true; } -static bool ReadHeader(const char * filename,unsigned int &/*num_cams*/, unsigned int &/*num_points*/){ - FILE *fp = fopen(filename, "r"); - if(!fp) return false; - ReadHeader(fp); - fclose(fp); - return true; -} - - static int Open( OpenMeshType &m, std::vector > & shots, std::vector & image_filenames, const char * filename,const char * filename_images, CallBackPos *cb=0)