Remove unused sys/time.h, remove snprintf, add casts for sign/unsigned complaints, all Visual C++

git-svn-id: https://cld2.googlecode.com/svn/trunk@78 b252ecd4-b096-bf77-eb8e-91563289f87e
This commit is contained in:
dsites@google.com
2013-09-08 00:38:49 +00:00
parent e0dc16ad01
commit b5ea6727b6
8 changed files with 17 additions and 31 deletions

View File

@@ -18,7 +18,6 @@
#include "getonescriptspan.h"
#include <sys/time.h> // for gettimeofday
#include <string.h>
#include "fixunicodevalue.h"
@@ -287,14 +286,6 @@ int runetochar(char *str, const char32 *rune) {
}
// Convert GetTimeOfDay output to 64-bit usec
static inline uint64 Microseconds(const struct timeval& t) {
// The SumReducer uses uint64, so convert to (uint64) microseconds,
// not (double) seconds.
return t.tv_sec * 1000000ULL + t.tv_usec;
}
// Useful for converting an entity to an ascii value.
// RETURNS unicode value, or -1 if entity isn't valid. Don't include & or ;
@@ -844,7 +835,6 @@ bool ScriptScanner::GetOneScriptSpan(LangSpan* span) {
map2original_.Clear();
map2original_.Delete(span->offset); // So that MapBack(0) gives offset
// gettimeofday(&script_start, NULL);
// Get to the first real non-tag letter or entity that is a letter
int skip = SkipToFrontOfSpan(next_byte_, byte_length_, &spanscript);
next_byte_ += skip;
@@ -861,8 +851,6 @@ bool ScriptScanner::GetOneScriptSpan(LangSpan* span) {
return false; // No more letters to be found
}
// gettimeofday(&script_mid, NULL);
// There is at least one letter, so we know the script for this span
span->ulscript = (ULScript)spanscript;