Browse Source

Removed early out in VS lookup code that made us prefer the first version found.

This was added to workaround VS 2013 type traits parsing problems, but since that's been fixed upstream this no longer makes sense.

Fixes PR159.
pull/155/merge
triton 12 years ago
parent
commit
59703cc08b
  1. 2
      src/CppParser/VSLookup.cpp
  2. 2
      src/Parser/VSLookup.cpp

2
src/CppParser/VSLookup.cpp

@ -108,11 +108,9 @@ static bool getSystemRegistryString(const char *keyPath, const char *valueName,
bestIndex = (int)index; bestIndex = (int)index;
bestValue = value; bestValue = value;
strcpy(bestName, keyName); strcpy(bestName, keyName);
goto Out;
} }
size = sizeof(keyName) - 1; size = sizeof(keyName) - 1;
} }
Out:
// If we found the highest versioned key, open the key and get the value. // If we found the highest versioned key, open the key and get the value.
if (bestIndex != -1) { if (bestIndex != -1) {
// Append rest of key. // Append rest of key.

2
src/Parser/VSLookup.cpp

@ -108,11 +108,9 @@ static bool getSystemRegistryString(const char *keyPath, const char *valueName,
bestIndex = (int)index; bestIndex = (int)index;
bestValue = value; bestValue = value;
strcpy(bestName, keyName); strcpy(bestName, keyName);
goto Out;
} }
size = sizeof(keyName) - 1; size = sizeof(keyName) - 1;
} }
Out:
// If we found the highest versioned key, open the key and get the value. // If we found the highest versioned key, open the key and get the value.
if (bestIndex != -1) { if (bestIndex != -1) {
// Append rest of key. // Append rest of key.

Loading…
Cancel
Save