From d4f601784abe1c8652999a30907ca63e5604fd84 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Sun, 1 Oct 2017 08:10:08 +0100 Subject: [PATCH] Use an unordered_map for the AMBE phrases. --- Voice.cpp | 2 +- Voice.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Voice.cpp b/Voice.cpp index c16ddd4..6fddac1 100644 --- a/Voice.cpp +++ b/Voice.cpp @@ -65,7 +65,7 @@ CVoice::~CVoice() for (std::vector::iterator it = m_data.begin(); it != m_data.end(); ++it) delete *it; - for (std::map::iterator it = m_positions.begin(); it != m_positions.end(); ++it) + for (std::unordered_map::iterator it = m_positions.begin(); it != m_positions.end(); ++it) delete it->second; m_data.clear(); diff --git a/Voice.h b/Voice.h index dff9ffd..c27aadb 100644 --- a/Voice.h +++ b/Voice.h @@ -27,7 +27,7 @@ #include #include -#include +#include enum VOICE_STATUS { VS_NONE, @@ -67,7 +67,7 @@ private: unsigned int m_streamId; unsigned int m_sent; unsigned char* m_ambe; - std::map m_positions; + std::unordered_map m_positions; std::vector m_data; std::vector::const_iterator m_it;