summaryrefslogtreecommitdiffstats
path: root/Source/cmIDEOptions.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmIDEOptions.cxx')
-rw-r--r--Source/cmIDEOptions.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx
index f996788..ee0c782 100644
--- a/Source/cmIDEOptions.cxx
+++ b/Source/cmIDEOptions.cxx
@@ -97,24 +97,24 @@ bool cmIDEOptions::CheckFlagTable(cmIDEFlagTable const* table,
{
const char* pf = flag.c_str() + 1;
// Look for an entry in the flag table matching this flag.
- for (cmIDEFlagTable const* entry = table; entry->IDEName; ++entry) {
+ for (cmIDEFlagTable const* entry = table; !entry->IDEName.empty(); ++entry) {
bool entry_found = false;
if (entry->special & cmIDEFlagTable::UserValue) {
// This flag table entry accepts a user-specified value. If
// the entry specifies UserRequired we must match only if a
// non-empty value is given.
- int n = static_cast<int>(strlen(entry->commandFlag));
- if ((strncmp(pf, entry->commandFlag, n) == 0 ||
+ int n = static_cast<int>(entry->commandFlag.length());
+ if ((strncmp(pf, entry->commandFlag.c_str(), n) == 0 ||
(entry->special & cmIDEFlagTable::CaseInsensitive &&
- cmsysString_strncasecmp(pf, entry->commandFlag, n))) &&
+ cmsysString_strncasecmp(pf, entry->commandFlag.c_str(), n))) &&
(!(entry->special & cmIDEFlagTable::UserRequired) ||
static_cast<int>(strlen(pf)) > n)) {
this->FlagMapUpdate(entry, std::string(pf + n));
entry_found = true;
}
- } else if (strcmp(pf, entry->commandFlag) == 0 ||
+ } else if (strcmp(pf, entry->commandFlag.c_str()) == 0 ||
(entry->special & cmIDEFlagTable::CaseInsensitive &&
- cmsysString_strcasecmp(pf, entry->commandFlag) == 0)) {
+ cmsysString_strcasecmp(pf, entry->commandFlag.c_str()) == 0)) {
if (entry->special & cmIDEFlagTable::UserFollowing) {
// This flag expects a value in the following argument.
this->DoingFollowing = entry;