avoid pedantic compilation warning

This commit is contained in:
brunoherbelin
2021-04-04 13:27:56 +02:00
parent f443720319
commit d2b4a825eb
2 changed files with 6 additions and 3 deletions

View File

@@ -261,6 +261,7 @@ void Shader::reset()
modelview = glm::identity<glm::mat4>();
iTransform = glm::identity<glm::mat4>();
color = glm::vec4(1.f, 1.f, 1.f, 1.f);
blending = BLEND_OPACITY;
}

View File

@@ -347,27 +347,29 @@ list<string> SystemToolkit::list_directory(const string& path, const string& fil
void SystemToolkit::open(const string& url)
{
int ignored __attribute__((unused));
#ifdef WIN32
ShellExecuteA( nullptr, nullptr, url.c_str(), nullptr, nullptr, 0 );
#elif defined APPLE
char buf[2048];
sprintf( buf, "open '%s'", url.c_str() );
(void) system( buf );
ignored = system( buf );
#else
char buf[2048];
sprintf( buf, "xdg-open '%s'", url.c_str() );
(void) system( buf );
ignored = system( buf );
#endif
}
void SystemToolkit::execute(const string& command)
{
int ignored __attribute__((unused));
#ifdef WIN32
ShellExecuteA( nullptr, nullptr, url.c_str(), nullptr, nullptr, 0 );
#elif defined APPLE
(void) system( command.c_str() );
#else
(void) system( command.c_str() );
ignored = system( command.c_str() );
#endif
}
// example :