forked from organicmaps/organicmaps-tmp
[eye] check for incorrect event type
This commit is contained in:
parent
b9004a0648
commit
c18ec044ea
2 changed files with 6 additions and 0 deletions
|
@ -389,6 +389,9 @@ void Eye::RegisterMapObjectEvent(MapObject const & mapObject, MapObject::Event::
|
|||
// static
|
||||
void Eye::Event::TipClicked(Tip::Type type, Tip::Event event)
|
||||
{
|
||||
CHECK_NOT_EQUAL(type, Tip::Type::Count, ());
|
||||
CHECK_NOT_EQUAL(event, Tip::Event::Count, ());
|
||||
|
||||
GetPlatform().RunTask(Platform::Thread::File, [type, event]
|
||||
{
|
||||
Instance().RegisterTipClick(type, event);
|
||||
|
@ -425,6 +428,8 @@ void Eye::Event::DiscoveryShown()
|
|||
// static
|
||||
void Eye::Event::DiscoveryItemClicked(Discovery::Event event)
|
||||
{
|
||||
CHECK_NOT_EQUAL(event, Discovery::Event::Count, ());
|
||||
|
||||
GetPlatform().RunTask(Platform::Thread::File, [event]
|
||||
{
|
||||
Instance().IncrementDiscoveryItem(event);
|
||||
|
|
|
@ -47,6 +47,7 @@ class Counters<T, R, EnableIfIsEnumWithCount<T>>
|
|||
public:
|
||||
void Increment(T const key)
|
||||
{
|
||||
CHECK_NOT_EQUAL(key, T::Count, ());
|
||||
++m_counters[static_cast<size_t>(key)];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue