Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/shared/Communication.cpp

Issue 11449051: Fix 64-bit conversion errors (Closed)
Patch Set: Created Aug. 16, 2013, 2:56 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 #include <Windows.h> 1 #include <Windows.h>
2 #include <Lmcons.h> 2 #include <Lmcons.h>
3 #include <Sddl.h> 3 #include <Sddl.h>
4 4
5 #include "Communication.h" 5 #include "Communication.h"
6 #include "Utils.h" 6 #include "Utils.h"
7 7
8 namespace 8 namespace
9 { 9 {
10 const int bufferSize = 1024; 10 const int bufferSize = 1024;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 stream << std::string(buffer.get(), bytesRead); 151 stream << std::string(buffer.get(), bytesRead);
152 } 152 }
153 return Communication::InputBuffer(stream.str()); 153 return Communication::InputBuffer(stream.str());
154 } 154 }
155 155
156 void Communication::Pipe::WriteMessage(Communication::OutputBuffer& message) 156 void Communication::Pipe::WriteMessage(Communication::OutputBuffer& message)
157 { 157 {
158 DWORD bytesWritten; 158 DWORD bytesWritten;
159 std::string data = message.Get(); 159 std::string data = message.Get();
160 if (!WriteFile(pipe, data.c_str(), data.length(), &bytesWritten, 0)) 160 if (!WriteFile(pipe, data.c_str(), static_cast<DWORD>(data.length()), &bytesWr itten, 0))
161 throw std::runtime_error("Failed to write to pipe"); 161 throw std::runtime_error("Failed to write to pipe");
162 } 162 }
OLDNEW

Powered by Google App Engine
This is Rietveld