Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Maintenance - Mise à jour mensuelle Lundi 6 Février entre 7h00 et 9h00
Open sidebar
Gauthier Quesnel
irritator
Commits
243162a7
Commit
243162a7
authored
Apr 20, 2020
by
Gauthier Quesnel
Browse files
gui: enable multi editors
parent
4dd7757c
Pipeline
#11106
failed with stage
in 48 seconds
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
app/gui/node-editor.cpp
View file @
243162a7
This diff is collapsed.
Click to expand it.
lib/include/irritator/core.hpp
View file @
243162a7
...
...
@@ -248,6 +248,8 @@ class small_string
u8
size_
;
public:
using
iterator
=
char
*
;
using
const_iterator
=
const
char
*
;
using
size_type
=
u8
;
static_assert
(
length
>
size_t
{
1
}
&&
length
<
size_t
{
254
});
...
...
@@ -313,6 +315,14 @@ public:
return
zero
==
size_
;
}
constexpr
void
size
(
std
::
size_t
sz
)
noexcept
{
if
(
sz
<=
capacity
())
{
buffer_
[
sz
]
=
'\0'
;
size_
=
static_cast
<
u8
>
(
sz
);
}
}
constexpr
std
::
size_t
size
()
const
noexcept
{
return
size_
;
...
...
@@ -320,7 +330,7 @@ public:
constexpr
std
::
size_t
capacity
()
const
noexcept
{
return
length
;
return
length
-
1
;
}
constexpr
void
assign
(
const
std
::
string_view
str
)
noexcept
...
...
@@ -364,6 +374,26 @@ public:
return
buffer_
;
}
constexpr
iterator
begin
()
noexcept
{
return
buffer_
;
}
constexpr
iterator
end
()
noexcept
{
return
buffer_
+
size_
;
}
constexpr
const_iterator
begin
()
const
noexcept
{
return
buffer_
;
}
constexpr
const_iterator
end
()
const
noexcept
{
return
buffer_
+
size_
;
}
constexpr
bool
operator
==
(
const
small_string
&
rhs
)
const
noexcept
{
return
std
::
strncmp
(
buffer_
,
rhs
.
buffer_
,
length
)
==
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment