*/
SyntaxColors::SyntaxColors()
{
- m_colors.resize(COLORINDEX_COUNT);
- m_bolds.resize(COLORINDEX_COUNT);
SetDefaults();
}
* @param [in] pColors Instance to copy.
*/
SyntaxColors::SyntaxColors(const SyntaxColors *pColors)
+ : m_colors{pColors->m_colors}
+ , m_bolds{pColors->m_bolds}
{
- m_colors.resize(COLORINDEX_COUNT);
- m_bolds.resize(COLORINDEX_COUNT);
- m_colors = pColors->m_colors;
- m_bolds = pColors->m_bolds;
}
/**
*/
void SyntaxColors::Clone(const SyntaxColors *pColors)
{
- m_colors.resize(COLORINDEX_COUNT);
- m_bolds.resize(COLORINDEX_COUNT);
m_colors = pColors->m_colors;
m_bolds = pColors->m_bolds;
}
#pragma once
#include <Windows.h>
-#include <vector>
+#include <array>
/**
* @brief Indexes to color table
// Implementation data
private:
- std::vector<COLORREF> m_colors; /**< Syntax highlight colors */
- std::vector<bool> m_bolds; /**< Bold font enable/disable */
+ std::array<COLORREF, COLORINDEX_COUNT> m_colors; /**< Syntax highlight colors */
+ std::array<bool, COLORINDEX_COUNT> m_bolds; /**< Bold font enable/disable */
};