Просмотр исходного кода

device: add buffer_{begin,end}() to Profiler

Daniele Bartolini 6 лет назад
Родитель
Сommit
bb02b60583
2 измененных файлов с 8 добавлено и 2 удалено
  1. 6 1
      src/device/profiler.cpp
  2. 2 1
      src/device/profiler.h

+ 6 - 1
src/device/profiler.cpp

@@ -28,11 +28,16 @@ namespace profiler_globals
 		_buffer = NULL;
 	}
 
-	const char* buffer()
+	const char* buffer_begin()
 	{
 		return array::begin(*_buffer);
 	}
 
+	const char* buffer_end()
+	{
+		return array::end(*_buffer);
+	}
+
 } // namespace profiler_globals
 
 namespace profiler

+ 2 - 1
src/device/profiler.h

@@ -98,7 +98,8 @@ namespace profiler_globals
 	void init();
 	void shutdown();
 
-	const char* buffer();
+	const char* buffer_begin();
+	const char* buffer_end();
 	void flush();
 	void clear();