diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-06-23 10:20:03 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-06-23 10:20:03 +0200 |
commit | 5cabc167e646e9d80b70d6617a3f031d77453979 (patch) | |
tree | c95e00cb8002f429fc7040da85fdeb91c2b35728 /common/pipeline.cpp | |
parent | 69954149a432f7a77f2613e348a2089bf5bb2012 (diff) | |
download | sink-5cabc167e646e9d80b70d6617a3f031d77453979.tar.gz sink-5cabc167e646e9d80b70d6617a3f031d77453979.zip |
Build with flatbuffers 1.7
There's a new template version that expects methods that QByteArray
doesn't have but breaks the implicit conversion to const char *,
std::string is safer anyways (doesn't require a null terminated string).
Diffstat (limited to 'common/pipeline.cpp')
-rw-r--r-- | common/pipeline.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/pipeline.cpp b/common/pipeline.cpp index dc6f128..f29c7db 100644 --- a/common/pipeline.cpp +++ b/common/pipeline.cpp | |||
@@ -303,8 +303,8 @@ KAsync::Job<qint64> Pipeline::modifiedEntity(void const *command, size_t size) | |||
303 | SinkTraceCtx(d->logCtx) << "Move of " << current.identifier() << "was successfull"; | 303 | SinkTraceCtx(d->logCtx) << "Move of " << current.identifier() << "was successfull"; |
304 | if (isMove) { | 304 | if (isMove) { |
305 | flatbuffers::FlatBufferBuilder fbb; | 305 | flatbuffers::FlatBufferBuilder fbb; |
306 | auto entityId = fbb.CreateString(current.identifier()); | 306 | auto entityId = fbb.CreateString(current.identifier().toStdString()); |
307 | auto type = fbb.CreateString(bufferType); | 307 | auto type = fbb.CreateString(bufferType.toStdString()); |
308 | auto location = Sink::Commands::CreateDeleteEntity(fbb, current.revision(), entityId, type, true); | 308 | auto location = Sink::Commands::CreateDeleteEntity(fbb, current.revision(), entityId, type, true); |
309 | Sink::Commands::FinishDeleteEntityBuffer(fbb, location); | 309 | Sink::Commands::FinishDeleteEntityBuffer(fbb, location); |
310 | const auto data = BufferUtils::extractBuffer(fbb); | 310 | const auto data = BufferUtils::extractBuffer(fbb); |
@@ -450,8 +450,8 @@ void Preprocessor::createEntity(const Sink::ApplicationDomain::ApplicationDomain | |||
450 | const auto entityBuffer = BufferUtils::extractBuffer(entityFbb); | 450 | const auto entityBuffer = BufferUtils::extractBuffer(entityFbb); |
451 | 451 | ||
452 | flatbuffers::FlatBufferBuilder fbb; | 452 | flatbuffers::FlatBufferBuilder fbb; |
453 | auto entityId = fbb.CreateString(entity.identifier()); | 453 | auto entityId = fbb.CreateString(entity.identifier().toStdString()); |
454 | auto type = fbb.CreateString(typeName); | 454 | auto type = fbb.CreateString(typeName.toStdString()); |
455 | auto delta = Sink::EntityBuffer::appendAsVector(fbb, entityBuffer.constData(), entityBuffer.size()); | 455 | auto delta = Sink::EntityBuffer::appendAsVector(fbb, entityBuffer.constData(), entityBuffer.size()); |
456 | auto location = Sink::Commands::CreateCreateEntity(fbb, entityId, type, delta); | 456 | auto location = Sink::Commands::CreateCreateEntity(fbb, entityId, type, delta); |
457 | Sink::Commands::FinishCreateEntityBuffer(fbb, location); | 457 | Sink::Commands::FinishCreateEntityBuffer(fbb, location); |