Changeset 12678 in vbox for trunk/src/VBox/Main/Performance.cpp
- Timestamp:
- Sep 24, 2008 7:28:21 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/Performance.cpp
r12400 r12678 463 463 } 464 464 465 /* The following method was borrowed from VMM/STAM.cpp */ 466 bool Filter::patternMatch(const char *pszPat, const char *pszName) 467 { 465 /* The following method was borrowed from VMM/STAM.cpp and modified to handle 466 * the special case of trailing colon in the pattern. 467 */ 468 bool Filter::patternMatch(const char *pszPat, const char *pszName, 469 bool fSeenColon) 470 { 471 bool seenColon = fSeenColon; 468 472 /* ASSUMES ASCII */ 469 473 for (;;) … … 473 477 { 474 478 default: 479 /* Handle a special case, the mask terminating with a colon */ 480 if (chPat == ':') 481 { 482 if (!seenColon && !*(pszPat + 1)) 483 return !*pszName; 484 seenColon = true; 485 } 475 486 if (*pszName != chPat) 476 487 return false; … … 482 493 /* nothing */; 483 494 495 /* Handle a special case, the mask terminating with a colon */ 496 if (chPat == ':') 497 { 498 if (!seenColon && !*(pszPat + 1)) 499 return !strchr(pszName, ':'); 500 seenColon = true; 501 } 484 502 for (;;) 485 503 { … … 487 505 if ( ch == chPat 488 506 && ( !chPat 489 || patternMatch(pszPat + 1, pszName )))507 || patternMatch(pszPat + 1, pszName, seenColon))) 490 508 return true; 491 509 if (!ch)
Note:
See TracChangeset
for help on using the changeset viewer.