Commit 91e4f12e authored by Morten Ofstad's avatar Morten Ofstad
Browse files

Fixed IsChannelAvailable/GetChannelIndex so they do string compare instead of...

Fixed IsChannelAvailable/GetChannelIndex so they do string compare instead of comparing pointers to strings.
parent 452f6a20
......@@ -201,7 +201,7 @@ bool VolumeDataLayoutImpl::isChannelAvailable(const char *channelName) const
for(int32_t channel = 0; channel < nChannels; channel++)
{
if(m_volumeDataChannelDescriptor[channel].getName() == channelName) return true;
if(strcmp(m_volumeDataChannelDescriptor[channel].getName(), channelName) == 0) return true;
}
return false;
......@@ -213,7 +213,7 @@ int32_t VolumeDataLayoutImpl::getChannelIndex(const char *channelName) const
for(int32_t channel = 0; channel < nChannels; channel++)
{
if(m_volumeDataChannelDescriptor[channel].getName() == channelName) return channel;
if(strcmp(m_volumeDataChannelDescriptor[channel].getName(), channelName) == 0) return channel;
}
assert(0 && "Should not call this function unless IsChannelAvailable() is true");
return 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment