Other.h.patch

Jan DolinĂ¡r, 12/27/2013 09:35 PM

Download (843 Bytes)

View differences:

uppsrc/Core/Other.h (working copy)
321 321
		int    prev, next;
322 322
		int    size;
323 323
		One<T> data;
324
		bool   flag;
325 324
	};
326 325
	
327 326
	struct Key : Moveable<Key> {
......
341 340

  
342 341
	int  foundsize;
343 342
	int  newsize;
344
	bool flag;
345 343

  
346 344

  
347 345
	void Unlink(int i);
......
498 496
template <class T, class K>
499 497
void LRUCache<T, K>::ClearCounters()
500 498
{
501
	flag = !flag;
502 499
	newsize = foundsize = 0;
503 500
}
504 501

  
......
515 512
		t.size = m.Make(t.data.Create());
516 513
		size += t.size;
517 514
		newsize += t.size;
518
		t.flag = flag;
519 515
	}
520 516
	else {
521 517
		Item& t = data[q];
522 518
		Unlink(q);
523
		if(t.flag != flag) {
524
			t.flag = flag;
525
			foundsize += t.size;
526
		}
519
		foundsize += t.size;
527 520
	}
528 521
	LinkHead(q);
529 522
	return *data[q].data;