Commit b37d274d authored by arq5x's avatar arq5x

merge conflicts

parents 66397856 7b280604
......@@ -179,7 +179,7 @@ $(UTIL_SUBDIRS) $(SUBDIRS): $(OBJ_DIR) $(BIN_DIR)
clean:
@$(MAKE) --no-print-directory --directory=$(BT_ROOT) clean_api
@echo " * Cleaning up."
@rm -f $(OBJ_DIR)/* $(BIN_DIR)/*
@rm -f $(VERSION_FILE) $(OBJ_DIR)/* $(BIN_DIR)/*
.PHONY: clean
test: all
......
This diff is collapsed.
......@@ -28,7 +28,10 @@ _EXT_OBJECTS=SingleLineDelimTextFileReader.o BamFileReader.o Bed3Interval.o Bed6
EXT_OBJECTS=$(patsubst %,$(OBJ_DIR)/%,$(_EXT_OBJECTS))
BUILT_OBJECTS= $(patsubst %,$(OBJ_DIR)/%,$(OBJECTS))
$(BUILT_OBJECTS): $(SOURCES) $(SUBDIRS)
all: $(BUILT_OBJECTS) $(SUBDIRS)
.PHONY: all
$(BUILT_OBJECTS): $(SOURCES)
@echo " * compiling FileRecordMgr.cpp"
@$(CXX) -c -o $(OBJ_DIR)/FileRecordMgr.o FileRecordMgr.cpp $(LDFLAGS) $(CXXFLAGS) $(INCLUDES)
@echo " * compiling FileRecordMergeMgr.cpp"
......@@ -48,4 +51,4 @@ clean:
@rm -f $(OBJ_DIR)/FileRecordMergeMgr.o
.PHONY: clean
\ No newline at end of file
.PHONY: clean
......@@ -8,12 +8,12 @@
#ifndef RECORDOUTPUTMGR_H_
#define RECORDOUTPUTMGR_H_
using namespace std;
#include "ContextBase.h"
#include "RecordKeyVector.h"
#include "api/BamWriter.h"
using namespace std;
class BlockMgr;
class RecordOutputMgr {
......
......@@ -6,6 +6,8 @@
*/
#include "CommonHelp.h"
using namespace std;
void CommonHelp() {
cerr << "\t-iobuf\t" << "Follow with desired integer size of read buffer." << endl;
cerr << "\t\t" << "Optional suffixes K/M/G supported." << endl;
......
......@@ -9,6 +9,7 @@
#define PARSETOOLS_H_
#include <cstring> //for memset
#include <limits>
#include <string>
#include <vector>
#include "QuickString.h"
......@@ -37,8 +38,7 @@ int str2chrPos(const QuickString &str);
template<class T>
void int2str(int number, T& buffer, bool appendToBuf = false)
{
register int useNum = number;
if (useNum == 0) {
if (number == 0) {
if (appendToBuf) {
buffer.append("0");
} else {
......@@ -47,42 +47,29 @@ void int2str(int number, T& buffer, bool appendToBuf = false)
return;
}
//check for negative numbers.
bool isNegative = useNum < 0;
bool isNegative = number < 0;
register unsigned useNum = number;
if (isNegative) {
useNum = 0 - useNum; //convert to positive.
}
//figure out how many digits we have
register int power = 10;
int numChars = 2 + (isNegative ? 1: 0);
while (power <= useNum) {
power *= 10;
numChars++;
}
char tmpBuffer[numeric_limits<int>::digits10 + 3];
char *tmpBuf = &tmpBuffer[sizeof tmpBuffer];
*--tmpBuf = '\0';
char tmpBuf[numChars];
memset(tmpBuf, 0, numChars);
while (useNum > 0) {
*--tmpBuf = (useNum % 10) + '0';
useNum /= 10;
}
int bufIdx=0;
if (isNegative) {
tmpBuf[0] = '-';
bufIdx = 1;
*--tmpBuf = '-';
}
register int currDig=0;
power /= 10;
while (power) {
currDig = useNum / power;
useNum -= currDig * power;
tmpBuf[bufIdx] = currDig + 48; //48 is ascii for zero.
bufIdx++;
power /= 10;
}
if (!appendToBuf) {
buffer = tmpBuf;
} else {
buffer.append(tmpBuf, numChars-1);
buffer.append(tmpBuf);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment