Skip to content

Commit

Permalink
Update palettes_base.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
justinlaughlin authored Nov 20, 2024
1 parent e748539 commit 96a5a20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/palettes_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ template <size_t N>
Palette::Palette(const string& name,
const array<array<float,3>,N>& arr) : name(name)
{
colors.reserve(N);
colors.resize(N);
for (size_t i = 0; i < N; ++i)
{
colors[i] = RGBAf(arr[i][0], arr[i][1], arr[i][2]);
Expand All @@ -37,7 +37,7 @@ template <size_t N>
Palette::Palette(const string& name,
const array<array<float,4>,N>& arr) : name(name)
{
colors.reserve(N);
colors.resize(N);
for (size_t i = 0; i < N; ++i)
{
colors[i] = RGBAf(arr[i][0], arr[i][1], arr[i][2], arr[i][3]);
Expand Down Expand Up @@ -334,4 +334,4 @@ void PaletteRegistry::Load(const string& palette_filename)
}
}
cout << "Finished loading palettes from file: " << palette_filename << endl;
}
}

0 comments on commit 96a5a20

Please sign in to comment.