Fixed spacing to make it consistent with the rest of the OSG and make it easier to read.

This commit is contained in:
Robert Osfield
2017-10-05 15:59:26 +01:00
parent 19a48951b7
commit 042a357278

View File

@@ -397,14 +397,19 @@ class ReaderWriterVNC : public osgDB::ReaderWriter
const osgDB::AuthenticationMap* authenticationMap = (options && options->getAuthenticationMap()) ?
options->getAuthenticationMap() :
osgDB::Registry::instance()->getAuthenticationMap();
if (authenticationMap != NULL) {
if (authenticationMap != NULL)
{
const osgDB::AuthenticationDetails* details = authenticationMap->getAuthenticationDetails(hostname);
if (details == NULL) {
if (details == NULL)
{
size_t pos = hostname.find(":");
if (pos != std::string::npos) {
if (pos != std::string::npos)
{
details = authenticationMap->getAuthenticationDetails(hostname.substr(0, pos));
}
}
// configure authentication if required.
if (details != NULL)
{
@@ -414,6 +419,7 @@ class ReaderWriterVNC : public osgDB::ReaderWriter
image->_password = details->password;
}
}
if (options && !options->getOptionString().empty())
{
image->_optionString = options->getOptionString();