Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(708)

Unified Diff: courgette/streams.cc

Issue 149597: Code changes to get the code to compile under GCC.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « courgette/streams.h ('k') | courgette/streams_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/streams.cc
===================================================================
--- courgette/streams.cc (revision 21002)
+++ courgette/streams.cc (working copy)
@@ -18,7 +18,6 @@
#include "courgette/streams.h"
-#include <io.h>
#include <memory.h>
#include "base/basictypes.h"
@@ -255,7 +254,7 @@
}
// Remaining bytes should add up to sum of lengths.
- if (end - finger != accumulated_length)
+ if (static_cast<size_t>(end - finger) != accumulated_length)
return false;
accumulated_length = finger - start;
@@ -335,27 +334,6 @@
return true;
}
-namespace {
-bool Write(int file_descriptor, SinkStream* sink) {
- size_t length = sink->Length();
- const void *buffer = sink->Buffer();
- int bytes_written = _write(file_descriptor, buffer, length);
- return bytes_written == length;
-}
-}
-
-bool SinkStreamSet::CopyToFileDescriptor(int file_descriptor) {
- SinkStream header;
- CopyHeaderTo(&header);
- if (!Write(file_descriptor, &header))
- return false;
- for (size_t i = 0; i < count_; ++i) {
- if (!Write(file_descriptor, stream(i)))
- return false;
- }
- return true;
-}
-
bool SinkStreamSet::WriteSet(SinkStreamSet* set) {
uint32 lengths[kMaxStreams];
// 'stream_count' includes all non-empty streams and all empty stream numbered
Property changes on: courgette/streams.cc
___________________________________________________________________
Name: svn:eol-style
+ LF
« no previous file with comments | « courgette/streams.h ('k') | courgette/streams_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698