linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #05124
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2778: add file size option
------------------------------------------------------------
revno: 2778
committer: Jacek Sieka <arnetheduck@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Sat 2011-12-31 16:22:17 +0100
message:
add file size option
modified:
utils/xsum.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'utils/xsum.cpp'
--- utils/xsum.cpp 2011-12-31 15:13:51 +0000
+++ utils/xsum.cpp 2011-12-31 15:22:17 +0000
@@ -25,9 +25,12 @@
return 1;
}
+ auto direct = argc < 2 ? true : argv[2][0] == '0';
+ auto bufSize = argc < 3 ? 0 : Util::toInt(argv[3]);
+
try {
auto start = microsec_clock::universal_time();
- FileReader fr(argc == 2 ? true : argv[2][0] == '0', 0);
+ FileReader fr(direct, bufSize);
TigerTree tt;
size_t total = 0;