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 compilation errors in C++11. #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion SNAPLib/AlignerContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ AlignerContext::printStats()
(stats->filtered > 0) ? numPctAndPad(filtered, stats->filtered, 100.0 * stats->filtered / stats->totalReads, 23, strBufLen) : "",
(stats->extraAlignments > 0) ? FormatUIntWithCommas(stats->extraAlignments, extraAlignments, strBufLen) : "",
isPaired() ? pctAndPad(pctPairs, 100.0 * stats->alignedAsPairs / stats->totalReads, 7, strBufLen) : "",
FormatUIntWithCommas((unsigned _int64)(1000 * stats->totalReads / max(alignTime, (_int64)1)), readsPerSecond, strBufLen), // Aligntime is in ms
FormatUIntWithCommas((_uint64)(1000 * stats->totalReads / max(alignTime, (_int64)1)), readsPerSecond, strBufLen), // Aligntime is in ms
FormatUIntWithCommas((alignTime + 500) / 1000, alignTimeString, strBufLen)
);

Expand Down
2 changes: 1 addition & 1 deletion SNAPLib/Compat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ bool WaitForEventWithTimeout(EventObject *eventObject, _int64 timeoutInMillis)

void BindThreadToProcessor(unsigned processorNumber) // This hard binds a thread to a processor. You can no-op it at some perf hit.
{
if (!SetThreadAffinityMask(GetCurrentThread(),((unsigned _int64)1) << processorNumber)) {
if (!SetThreadAffinityMask(GetCurrentThread(),((_uint64)1) << processorNumber)) {
WriteErrorMessage("Binding thread to processor %d failed, %d\n",processorNumber,GetLastError());
}
}
Expand Down
2 changes: 1 addition & 1 deletion SNAPLib/LandauVishkin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ bool writeCigar(char** o_buf, int* o_buflen, int count, char code, CigarFormat f
}
int written = snprintf(*o_buf, *o_buflen, "%d%c", count, code);
if (written > *o_buflen - 1) {
*o_buf = '\0';
**o_buf = '\0';
return false;
} else {
*o_buf += written;
Expand Down