diff --git a/Apps/Examples/texturesExample.cpp b/Apps/Examples/texturesExample.cpp index ca3471e23ac0cd69b9e3d8e9d2d96f1685ed8543..34de2cb39b3e268fcfc91724e0b998e031cd67d0 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 d6a05cfb687ae144758ec313ccc54019f64bd0d4..db45eff52edf3bbbe7362c69c2b54c0e3814b542 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();