| 417 | |
| 418 | |
| 419 | int CALLBACK PluginListView::versionComparer(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) |
| 420 | { |
| 421 | PluginVersion version1, version2; |
| 422 | |
| 423 | switch(static_cast<LVSORTCOLUMN>(lParamSort)) |
| 424 | { |
| 425 | case LVSORTCOLUMN_VERSIONAVAILABLE: |
| 426 | version1 = reinterpret_cast<Plugin*>(lParam1)->getVersion(); |
| 427 | version2 = reinterpret_cast<Plugin*>(lParam2)->getVersion(); |
| 428 | break; |
| 429 | |
| 430 | case LVSORTCOLUMN_VERSIONINSTALLED: |
| 431 | version1 = reinterpret_cast<Plugin*>(lParam1)->getInstalledVersion(); |
| 432 | version2 = reinterpret_cast<Plugin*>(lParam2)->getInstalledVersion(); |
| 433 | break; |
| 434 | |
| 435 | } |
| 436 | |
| 437 | int retVal = 0; |
| 438 | |
| 439 | if (version1 < version2) |
| 440 | retVal = -1; |
| 441 | else if (version1 > version2) |
| 442 | retVal = 1; |
| 443 | |
| 444 | return retVal; |
| 445 | } |
nothing calls this directly
no outgoing calls
no test coverage detected