Skip to content

Commit 1582c9c

Browse files
committed
Refactoring
1 parent 67b0980 commit 1582c9c

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

include/lunasvg.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ class LUNASVG_API Bitmap {
175175

176176
/**
177177
* @brief clear
178-
* @param color
178+
* @param value
179179
*/
180-
void clear(uint32_t color);
180+
void clear(uint32_t value);
181181

182182
/**
183183
* @brief convertToRGBA

meson_options.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
option('examples', type : 'feature', value : 'auto')
22
option('tests', type : 'feature', value : 'auto')
3-
option('expat', type : 'feature', value : 'auto')

source/lunasvg.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ bool Bitmap::writeToPng(const std::string& filename) const
118118

119119
plutovg_surface_t* Bitmap::release()
120120
{
121-
auto surface = m_surface;
122-
m_surface = nullptr;
123-
return surface;
121+
return std::exchange(m_surface, nullptr);
124122
}
125123

126124
Box::Box(float x, float y, float w, float h)

source/svgproperty.h

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "graphics.h"
55

66
#include <string>
7-
#include <vector>
87

98
namespace lunasvg {
109

0 commit comments

Comments
 (0)