diff options
author | John Wiegley <johnw@newartisans.com> | 2010-03-17 06:22:43 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-03-17 06:22:43 -0400 |
commit | 7ca8149ec5c7fa88d98df83e6260210372223036 (patch) | |
tree | 4c5741d682e89b1ea4e567c32a78d32ba17737db /src/xact.cc | |
parent | 3bb4cb6b6055f180112f357cf23463a1b8c186c5 (diff) | |
parent | 8dd362b57cf2b49c5268e72898ae873522d8756f (diff) | |
download | ledger-7ca8149ec5c7fa88d98df83e6260210372223036.tar.gz ledger-7ca8149ec5c7fa88d98df83e6260210372223036.tar.bz2 ledger-7ca8149ec5c7fa88d98df83e6260210372223036.zip |
Merge branch 'next'
Diffstat (limited to 'src/xact.cc')
-rw-r--r-- | src/xact.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/xact.cc b/src/xact.cc index 623c5772..1a022387 100644 --- a/src/xact.cc +++ b/src/xact.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2009, John Wiegley. All rights reserved. + * Copyright (c) 2003-2010, John Wiegley. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -454,12 +454,7 @@ string xact_t::idstring() const string xact_t::id() const { - SHA1 sha; - sha.Reset(); - sha << idstring().c_str(); - uint_least32_t message_digest[5]; - sha.Result(message_digest); - return to_hex(message_digest, 5); + return sha1sum(idstring()); } namespace { @@ -760,7 +755,7 @@ void to_xml(std::ostream& out, const xact_t& xact) if (xact.metadata) { push_xml y(out, "metadata"); foreach (const item_t::string_map::value_type& pair, *xact.metadata) { - if (pair.second) { + if (pair.second.first) { push_xml z(out, "variable"); { push_xml w(out, "key"); @@ -768,7 +763,7 @@ void to_xml(std::ostream& out, const xact_t& xact) } { push_xml w(out, "value"); - out << y.guard(*pair.second); + out << y.guard(*pair.second.first); } } else { push_xml z(out, "tag"); |