Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ambiguous overloaded call on SPK::IO::Buffer #20

Open
wants to merge 1 commit into
base: spark2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Extensions/IOConverters/SPK_IO_SPKSaver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ namespace IO
template<typename T>
void storeValue(const std::vector<Ref<T> >& value, Buffer& buffer)
{
buffer << value.size();
buffer << static_cast<unsigned int>(value.size());
for(unsigned int t = 0; t < value.size(); t++)
buffer << saver->context->refId(value[t].get());
}
Expand Down Expand Up @@ -142,7 +142,7 @@ namespace IO
unsigned int pos = buffer.getPosition();
buffer.setPosition(nbAttrPos);
buffer << nbAttrs;
buffer << (pos - buffer.getPosition() - 4);
buffer << (pos - static_cast<unsigned int>(buffer.getPosition()) - 4);
buffer.setPosition(pos);
}

Expand Down Expand Up @@ -236,7 +236,7 @@ namespace IO
// Header
context->buffer << SPKFormatVariables::MAGIC_NUMBER
<< SPKFormatVariables::VERSION
<< objRef.size();
<< static_cast<unsigned int>(objRef.size());
context->nbConnectionPosition = context->buffer.getPosition();
context->buffer << (unsigned int)0; // Number of connections will be known in the 2nd phase
context->buffer << (unsigned int)0; // Data-length is not already known
Expand Down Expand Up @@ -273,7 +273,7 @@ namespace IO

context->buffer.setPosition(context->nbConnectionPosition);
context->buffer << context->nbConnections;
context->buffer << (context->buffer.getSize() - context->buffer.getPosition() - 4);
context->buffer << static_cast<unsigned int>(context->buffer.getSize() - context->buffer.getPosition() - 4);
context->os.write(context->buffer.getData(), context->buffer.getSize());

SPK_DELETE(context);
Expand Down