Making DALi public API typesafe using guaranteed types; uint8_t, uint32_t
[platform/core/uifw/dali-core.git] / dali / public-api / events / touch-event.cpp
index 8090d74..9a3a821 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,6 +18,9 @@
 // CLASS HEADER
 #include <dali/public-api/events/touch-event.h>
 
+// EXTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
+
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 
@@ -38,12 +41,12 @@ TouchEvent::~TouchEvent()
 {
 }
 
-unsigned int TouchEvent::GetPointCount() const
+uint32_t TouchEvent::GetPointCount() const
 {
-  return points.size();
+  return static_cast<uint32_t>( points.size() );
 }
 
-const TouchPoint& TouchEvent::GetPoint(unsigned int point) const
+const TouchPoint& TouchEvent::GetPoint( uint32_t point ) const
 {
   DALI_ASSERT_ALWAYS( point < points.size() && "No point at index" );
   return points[point];