MCPcopy Create free account
hub / github.com/bruderstein/nppPluginManager / versionComparer

Method versionComparer

pluginManager/src/PluginListView.cpp:419–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417
418
419int 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected