mirror of
https://github.com/znc/znc.git
synced 2026-07-04 08:51:14 +02:00
Remove some code duplication in TCacheMap
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2259 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -267,12 +267,7 @@ public:
|
||||
* @param uTTL the time-to-live for this specific item
|
||||
*/
|
||||
void AddItem(const K& Item, unsigned int uTTL) {
|
||||
if (!uTTL) { // If time-to-live is zero we don't want to waste our time adding it
|
||||
RemItem(Item); // Remove the item incase it already exists
|
||||
return;
|
||||
}
|
||||
|
||||
m_mItems[Item] = value(CUtils::GetMillTime() + uTTL, V());
|
||||
AddItem(Item, V(), uTTL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user