- Replace header include guards with `#pragma once` and perform minor optimizations. - Replaced traditional include guards with `#pragma once` for simplicity and to reduce boilerplate in all headers. - Improved CLI line number handling with clamping and error messaging. - Enhanced `chdir` error handling for macOS GUI builds. - Removed redundant logic for GUI builds. - Adjusted font constructor and registry to handle `const` data pointers consistently.
32 lines
455 B
C++
32 lines
455 B
C++
/*
|
|
* TestRenderer.h - minimal renderer for testing (no actual display)
|
|
*/
|
|
#pragma once
|
|
#include <cstddef>
|
|
|
|
#include "Renderer.h"
|
|
|
|
|
|
class TestRenderer final : public Renderer {
|
|
public:
|
|
TestRenderer() = default;
|
|
|
|
~TestRenderer() override = default;
|
|
|
|
void Draw(Editor &ed) override;
|
|
|
|
|
|
[[nodiscard]] std::size_t GetDrawCount() const
|
|
{
|
|
return draw_count_;
|
|
}
|
|
|
|
|
|
void ResetDrawCount()
|
|
{
|
|
draw_count_ = 0;
|
|
}
|
|
|
|
private:
|
|
std::size_t draw_count_ = 0;
|
|
}; |