aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/model/GFBuffer.h
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-10 03:41:34 +0000
committersaturneric <[email protected]>2024-01-10 03:41:34 +0000
commit802d7ed9907a08941af353fd65c6d528a8d5ba2c (patch)
tree4362de48824e960053fbb57fc29f078797af68e3 /src/core/model/GFBuffer.h
parentfix: slove some of the app building issues (diff)
downloadGpgFrontend-802d7ed9907a08941af353fd65c6d528a8d5ba2c.tar.gz
GpgFrontend-802d7ed9907a08941af353fd65c6d528a8d5ba2c.zip
feat: update core apis, functions and models
Diffstat (limited to 'src/core/model/GFBuffer.h')
-rw-r--r--src/core/model/GFBuffer.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/model/GFBuffer.h b/src/core/model/GFBuffer.h
index 57fbbc43..7cd5cbc5 100644
--- a/src/core/model/GFBuffer.h
+++ b/src/core/model/GFBuffer.h
@@ -47,7 +47,7 @@ class GPGFRONTEND_CORE_EXPORT GFBuffer {
auto operator==(const GFBuffer& o) const -> bool;
- auto Data() -> std::byte*;
+ [[nodiscard]] auto Data() const -> std::byte*;
void Resize(size_t size);
@@ -55,7 +55,9 @@ class GPGFRONTEND_CORE_EXPORT GFBuffer {
[[nodiscard]] auto Empty() const -> bool;
- auto ConvertToQByteArray() -> QByteArray;
+ [[nodiscard]] auto ConvertToQByteArray() const -> QByteArray;
+
+ [[nodiscard]] auto ConvertToStdString() const -> std::string;
private:
std::shared_ptr<std::vector<std::byte>> buffer_;