Cleaned up getEnvVar usage

This commit is contained in:
Robert Osfield 2017-11-02 11:42:25 +00:00
parent ce69f18ec7
commit 9dc6c454f4

View File

@ -214,8 +214,7 @@ void ViewerBase::setThreadingModel(ThreadingModel threadingModel)
ViewerBase::ThreadingModel ViewerBase::suggestBestThreadingModel()
{
std::string str;
osg::getEnvVar("OSG_THREADING", str);
if (!str.empty())
if (osg::getEnvVar("OSG_THREADING", str))
{
if (str=="SingleThreaded") return SingleThreaded;
else if (str=="CullDrawThreadPerContext") return CullDrawThreadPerContext;