aboutsummaryrefslogtreecommitdiffstats
path: root/sample/bls_smpl.cpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2016-08-30 13:59:32 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2016-08-30 13:59:32 +0800
commit0a6548f5e2027c217c550d72d08673f67cb1f161 (patch)
treeb079f3694dbede7dc79925fd30e48cc1efbe7772 /sample/bls_smpl.cpp
parentd50143e7909559f745f33090d429b3105af0ee4d (diff)
downloaddexon-bls-0a6548f5e2027c217c550d72d08673f67cb1f161.tar
dexon-bls-0a6548f5e2027c217c550d72d08673f67cb1f161.tar.gz
dexon-bls-0a6548f5e2027c217c550d72d08673f67cb1f161.tar.bz2
dexon-bls-0a6548f5e2027c217c550d72d08673f67cb1f161.tar.lz
dexon-bls-0a6548f5e2027c217c550d72d08673f67cb1f161.tar.xz
dexon-bls-0a6548f5e2027c217c550d72d08673f67cb1f161.tar.zst
dexon-bls-0a6548f5e2027c217c550d72d08673f67cb1f161.zip
add sample/bls_tool.cpp
Diffstat (limited to 'sample/bls_smpl.cpp')
-rw-r--r--sample/bls_smpl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sample/bls_smpl.cpp b/sample/bls_smpl.cpp
index 85530dd..e701b5f 100644
--- a/sample/bls_smpl.cpp
+++ b/sample/bls_smpl.cpp
@@ -23,7 +23,7 @@ void save(const std::string& file, const T& t, const bls::Id& id = 0)
{
const std::string name = makeName(file, id);
std::ofstream ofs(name.c_str(), std::ios::binary);
- if (!(ofs << std::hex << t)) {
+ if (!(ofs << std::hex << std::showbase << t)) {
throw cybozu::Exception("can't save") << name;
}
}
@@ -33,7 +33,7 @@ void load(T& t, const std::string& file, const bls::Id& id = 0)
{
const std::string name = makeName(file, id);
std::ifstream ifs(name.c_str(), std::ios::binary);
- if (!(ifs >> std::hex >> t)) {
+ if (!(ifs >> t)) {
throw cybozu::Exception("can't load") << name;
}
t.id = id;