Skip to content

Commit 79d10cf

Browse files
committed
Modernize interaction model, upgrade to C++20, and fix build
- Removed legacy edge-panning from all mouse modes. - Implemented universal panning via Middle Mouse Button (MMB), Spacebar + Left Mouse Button (LMB), two-finger gestures, and smooth trackpad scrolling. - Transitioned Connection and Area Selection tools to a click-to-click model. - Improved Connection tool UX with Cyan ghost lines and Green snap points. - Centralized room-relative direction snapping logic in `src/map/ExitDirection.cpp`. - Upgraded project to C++20 standard. - Fixed C++20 migration issues: restored `concepts.h`, made `Crtp` constructors public, and resolved `std::unordered_map` transparency in `emojis.cpp`. - Fixed build error in `src/syntax/Value.h` related to incomplete types in `std::vector`. - Integrated `TestUIState` unit tests. - Applied project-wide code formatting.
1 parent 30e8f8b commit 79d10cf

2 files changed

Lines changed: 24 additions & 4 deletions

File tree

src/syntax/Value.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,26 @@ Vector::Base::const_iterator Vector::end() const
137137
return m_vector->end();
138138
}
139139

140+
bool Vector::empty() const
141+
{
142+
return m_vector->empty();
143+
}
144+
145+
size_t Vector::size() const
146+
{
147+
return m_vector->size();
148+
}
149+
150+
const Value &Vector::at(size_t pos) const
151+
{
152+
return m_vector->at(pos);
153+
}
154+
155+
const Value &Vector::operator[](size_t pos) const
156+
{
157+
return at(pos);
158+
}
159+
140160
Vector getAnyVectorReversed(const Pair *const matched)
141161
{
142162
size_t len = 0;

src/syntax/Value.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ struct NODISCARD Vector final
3838
NODISCARD Base::const_iterator end() const;
3939

4040
public:
41-
NODISCARD bool empty() const { return m_vector->empty(); }
42-
NODISCARD size_t size() const { return m_vector->size(); }
41+
NODISCARD bool empty() const;
42+
NODISCARD size_t size() const;
4343
// NOTE: at() throws if out of range.
44-
const Value &at(size_t pos) const { return m_vector->at(pos); }
45-
const Value &operator[](size_t pos) const { return at(pos); }
44+
const Value &at(size_t pos) const;
45+
const Value &operator[](size_t pos) const;
4646

4747
public:
4848
friend std::ostream &operator<<(std::ostream &os, const Vector &v);

0 commit comments

Comments
 (0)