summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog/cmCursesMainForm.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-09-16 21:45:27 (GMT)
committerBrad King <brad.king@kitware.com>2010-09-16 21:45:27 (GMT)
commit5d7c3c0a594a57705f42ad6e1fa454234bfe7b56 (patch)
treed34313cacef89cfbc8da531823680c2762304ce3 /Source/CursesDialog/cmCursesMainForm.h
parentfec71d80165a74c423b8c56b00993ab4fb917041 (diff)
downloadCMake-5d7c3c0a594a57705f42ad6e1fa454234bfe7b56.zip
CMake-5d7c3c0a594a57705f42ad6e1fa454234bfe7b56.tar.gz
CMake-5d7c3c0a594a57705f42ad6e1fa454234bfe7b56.tar.bz2
ccmake: Fix search with '/'
Commit 7a18dd8e (Add searching of variables, 2003-03-07) added method cmCursesMainForm::JumpToCacheEntry to search for cache entries whose names match a given search string. The method also had a useless argument "int idx" probably left from earlier development iterations and hard-coded in all calls to the value '-1'. The method compared this argument to the "NumberOfVisibleEntries" member which at the time was of type "int" also. Commit ff1f8d0b (Fix or cast more integer conversions in cmake, 2010-06-29) changed the type of "NumberOfVisibleEntries" to size_t to fix other integer conversion warnings. An unsigned type makes sense given the purpose of the member. However, this caused the '-1' signed value to be converted to a large unsigned value in the above-mentioned comparison, leading to incorrect behavior. Fix the problem by removing the useless argument and the comparison.
Diffstat (limited to 'Source/CursesDialog/cmCursesMainForm.h')
-rw-r--r--Source/CursesDialog/cmCursesMainForm.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h
index 4084415..3e191b4 100644
--- a/Source/CursesDialog/cmCursesMainForm.h
+++ b/Source/CursesDialog/cmCursesMainForm.h
@@ -122,9 +122,8 @@ protected:
// Remove an entry from the interface and the cache.
void RemoveEntry(const char* value);
- // Jump to the cache value with index idx. If string str is
- // specified, it will stop on widget that contain that string.
- void JumpToCacheEntry(int idx, const char* str);
+ // Jump to the cache entry whose name matches the string.
+ void JumpToCacheEntry(const char* str);
// Copies of cache entries stored in the user interface
std::vector<cmCursesCacheEntryComposite*>* Entries;