mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:37:34 +00:00
LibJS: Use default instead of an empty constructor/destructor
Default implementations allow for more optimizations. See: https://pvs-studio.com/en/docs/warnings/v832/
This commit is contained in:
parent
fda48d7a6b
commit
e2d154c74d
3 changed files with 2 additions and 6 deletions
|
@ -17,10 +17,6 @@ CellAllocator::CellAllocator(size_t cell_size)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
CellAllocator::~CellAllocator()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
Cell* CellAllocator::allocate_cell(Heap& heap)
|
Cell* CellAllocator::allocate_cell(Heap& heap)
|
||||||
{
|
{
|
||||||
if (m_usable_blocks.is_empty()) {
|
if (m_usable_blocks.is_empty()) {
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace JS {
|
||||||
class CellAllocator {
|
class CellAllocator {
|
||||||
public:
|
public:
|
||||||
explicit CellAllocator(size_t cell_size);
|
explicit CellAllocator(size_t cell_size);
|
||||||
~CellAllocator();
|
~CellAllocator() = default;
|
||||||
|
|
||||||
size_t cell_size() const { return m_cell_size; }
|
size_t cell_size() const { return m_cell_size; }
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ public:
|
||||||
template<class T>
|
template<class T>
|
||||||
class Handle {
|
class Handle {
|
||||||
public:
|
public:
|
||||||
Handle() { }
|
Handle() = default;
|
||||||
|
|
||||||
static Handle create(T* cell)
|
static Handle create(T* cell)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue