From dd18c2b96b8dedc6ee6b169f4f738642debb7254 Mon Sep 17 00:00:00 2001 From: Sylvain Thery Date: Thu, 25 Apr 2013 15:06:12 +0200 Subject: [PATCH] remove some warnings --- Apps/Examples/texturesExample.cpp | 14 +++++++------- Apps/Examples/texturesExample.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Apps/Examples/texturesExample.cpp b/Apps/Examples/texturesExample.cpp index ca3471e23..34de2cb39 100644 --- a/Apps/Examples/texturesExample.cpp +++ b/Apps/Examples/texturesExample.cpp @@ -157,17 +157,17 @@ void TexView::cb_keyPress(int code) updateGL(); } -void TexView::init(char *fnm, char* fnt) +void TexView::init(const std::string& fnm, const std::string& fnt) { - if (fnm == NULL) + if (fnm.empty() ) { computeTore(); - m_fileNameTex = std::string(fnt); + m_fileNameTex = fnt; } else { - m_fileNameMesh = std::string(fnm); - m_fileNameTex = std::string(fnt); + m_fileNameMesh = fnm; + m_fileNameTex = fnt; std::vector attrNames; m_obj.import(m_fileNameMesh,attrNames); @@ -260,11 +260,11 @@ int main(int argc, char**argv) } else if (argc == 2) { - tv.init(NULL, argv[1]); + tv.init("", argv[1]); } else { - tv.init(NULL,"x"); + tv.init("","x"); } diff --git a/Apps/Examples/texturesExample.h b/Apps/Examples/texturesExample.h index d6a05cfb6..db45eff52 100644 --- a/Apps/Examples/texturesExample.h +++ b/Apps/Examples/texturesExample.h @@ -89,7 +89,7 @@ public: ~TexView(); - void init(char* fnm, char* fnt); + void init(const std::string& fnm, const std::string& fnt); // callbacks of simpleQT to overdefine: void cb_redraw(); -- GitLab