LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2009 IITP RAS | 3 * Copyright (c) 2009 IITP RAS |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 m_idCache.push_back (uniqueId); | 49 m_idCache.push_back (uniqueId); |
50 return false; | 50 return false; |
51 } | 51 } |
52 void | 52 void |
53 IdCache::Purge () | 53 IdCache::Purge () |
54 { | 54 { |
55 m_idCache.erase (remove_if (m_idCache.begin (), m_idCache.end (), | 55 m_idCache.erase (remove_if (m_idCache.begin (), m_idCache.end (), |
56 IsExpired ()), m_idCache.end ()); | 56 IsExpired ()), m_idCache.end ()); |
57 } | 57 } |
58 | 58 |
59 uint32_t | 59 std::size_t |
60 IdCache::GetSize () | 60 IdCache::GetSize () |
61 { | 61 { |
62 Purge (); | 62 Purge (); |
63 return static_cast<uint32_t>(m_idCache.size ()); | 63 return m_idCache.size (); |
64 } | 64 } |
65 | 65 |
66 } | 66 } |
67 } | 67 } |
LEFT | RIGHT |