summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/palette.cpp
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2015-12-13 11:23:55 +0100
committer ImJezze <jezze@gmx.net>2015-12-13 11:23:55 +0100
commit4e580a77b9da9b78aba1fec8e44b1de5a4a14aaf (patch)
treedf0e1d28daa79b9151088498a933cd1fc37c9c07 /src/lib/util/palette.cpp
parent1cda42b22e591965ee69561fcf52272bd991b3b2 (diff)
parent14d5966a379e9783ba724750a5f84a72af62cadc (diff)
Merge pull request #9 from mamedev/master
Sync to base master
Diffstat (limited to 'src/lib/util/palette.cpp')
-rw-r--r--src/lib/util/palette.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/util/palette.cpp b/src/lib/util/palette.cpp
index cafdce24ebd..bd3c2d45ede 100644
--- a/src/lib/util/palette.cpp
+++ b/src/lib/util/palette.cpp
@@ -66,7 +66,7 @@ const UINT32 *palette_client::dirty_state::dirty_list(UINT32 &mindirty, UINT32 &
maxdirty = m_maxdirty;
// if nothing to report, report nothing
- return (m_mindirty > m_maxdirty) ? NULL : &m_dirty[0];
+ return (m_mindirty > m_maxdirty) ? nullptr : &m_dirty[0];
}
@@ -128,7 +128,7 @@ void palette_client::dirty_state::reset()
palette_client::palette_client(palette_t &palette)
: m_palette(palette),
- m_next(NULL),
+ m_next(nullptr),
m_live(&m_dirty[0]),
m_previous(&m_dirty[1])
{
@@ -153,7 +153,7 @@ palette_client::palette_client(palette_t &palette)
palette_client::~palette_client()
{
// first locate and remove ourself from our palette's list
- for (palette_client **curptr = &m_palette.m_client_list; *curptr != NULL; curptr = &(*curptr)->m_next)
+ for (palette_client **curptr = &m_palette.m_client_list; *curptr != nullptr; curptr = &(*curptr)->m_next)
if (*curptr == this)
{
*curptr = m_next;
@@ -174,8 +174,8 @@ const UINT32 *palette_client::dirty_list(UINT32 &mindirty, UINT32 &maxdirty)
{
// if nothing to report, report nothing and don't swap
const UINT32 *result = m_live->dirty_list(mindirty, maxdirty);
- if (result == NULL)
- return NULL;
+ if (result == nullptr)
+ return nullptr;
// swap the live and previous lists
dirty_state *temp = m_live;
@@ -220,7 +220,7 @@ palette_t::palette_t(UINT32 numcolors, UINT32 numgroups)
m_adjusted_rgb15(numcolors * numgroups + 2),
m_group_bright(numgroups),
m_group_contrast(numgroups),
- m_client_list(NULL)
+ m_client_list(nullptr)
{
// initialize gamma map
for (UINT32 index = 0; index < 256; index++)
@@ -556,6 +556,6 @@ void palette_t::update_adjusted_color(UINT32 group, UINT32 index)
m_adjusted_rgb15[finalindex] = adjusted.as_rgb15();
// mark dirty in all clients
- for (palette_client *client = m_client_list; client != NULL; client = client->next())
+ for (palette_client *client = m_client_list; client != nullptr; client = client->next())
client->mark_dirty(finalindex);
}