aboutsummaryrefslogtreecommitdiff
path: root/zenserver/projectstore.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-28 21:57:23 +0200
committerStefan Boberg <[email protected]>2021-09-28 21:57:23 +0200
commit3d414de23eadccdf85fd1455a0dfcbce10e07cdd (patch)
tree2ad07069a5d507017a423aa91b728655ca914389 /zenserver/projectstore.cpp
parentRemoving a bunch of no-longer-useful code from stream.h/cpp in preparation fo... (diff)
downloadzen-3d414de23eadccdf85fd1455a0dfcbce10e07cdd.tar.xz
zen-3d414de23eadccdf85fd1455a0dfcbce10e07cdd.zip
Removed MemoryOutStream, MemoryInStream
BinaryWriter/BinaryReader now implements memory buffer functionality which previously needed two chained instances of a Buffer/Reader. This was originally expected to be an abstraction for file and other stream access but this is not going to be useful so may as well collapse the functionality. This also eliminates the need for stack-aware ref-counting which is the real reason for wanting to get rid of this code. This was a very old experimental feature which turned out to be a bad idea. This also removes the /cas/batch endpoint
Diffstat (limited to 'zenserver/projectstore.cpp')
-rw-r--r--zenserver/projectstore.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/zenserver/projectstore.cpp b/zenserver/projectstore.cpp
index 1f4239b23..1a9eb2c67 100644
--- a/zenserver/projectstore.cpp
+++ b/zenserver/projectstore.cpp
@@ -635,8 +635,7 @@ ProjectStore::Project::Read()
void
ProjectStore::Project::Write()
{
- MemoryOutStream Mem;
- BinaryWriter Writer(Mem);
+ BinaryWriter Mem;
CbObjectWriter Cfg;
Cfg << "id" << Identifier;
@@ -644,7 +643,7 @@ ProjectStore::Project::Write()
Cfg << "project" << ProjectRootDir;
Cfg << "engine" << EngineRootDir;
- Cfg.Save(Writer);
+ Cfg.Save(Mem);
CreateDirectories(m_OplogStoragePath);
@@ -951,9 +950,8 @@ HttpProjectService::HttpProjectService(CasStore& Store, ProjectStore* Projects)
// Parse Request
- IoBuffer Payload = HttpReq.ReadPayload();
- MemoryInStream MemIn(Payload.Data(), Payload.Size());
- BinaryReader Reader(MemIn);
+ IoBuffer Payload = HttpReq.ReadPayload();
+ BinaryReader Reader(Payload);
struct RequestHeader
{