logic: Use sizeof(SharedMemory::String) in shared memory size estimation instead of std::string (issue #471)

This commit is contained in:
Eberhard Graether
2017-10-13 12:26:45 +02:00
parent 1d9b322e3e
commit a7363b329b
15 changed files with 38 additions and 37 deletions
@@ -25,13 +25,13 @@ IndexerCommandType IndexerCommandJava::getIndexerCommandType() const
return getStaticIndexerCommandType();
}
size_t IndexerCommandJava::getByteSize() const
size_t IndexerCommandJava::getByteSize(size_t stringSize) const
{
size_t size = IndexerCommand::getByteSize();
size_t size = IndexerCommand::getByteSize(stringSize);
for (auto& i : m_classPath)
{
size += sizeof(std::string) + i.str().size();
size += stringSize + i.str().size();
}
return size;
@@ -21,7 +21,7 @@ public:
virtual ~IndexerCommandJava();
virtual IndexerCommandType getIndexerCommandType() const override;
virtual size_t getByteSize() const override;
virtual size_t getByteSize(size_t stringSize) const override;
std::vector<FilePath> getClassPath() const;