summaryrefslogtreecommitdiff
path: root/xact.cc
diff options
context:
space:
mode:
Diffstat (limited to 'xact.cc')
-rw-r--r--xact.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/xact.cc b/xact.cc
index 211553a9..d0360f7f 100644
--- a/xact.cc
+++ b/xact.cc
@@ -169,11 +169,9 @@ xact_context::xact_context(const xact_t& _xact, const string& desc) throw()
{
const paths_list& sources(xact.entry->journal->sources);
unsigned int x = 0;
- for (paths_list::const_iterator i = sources.begin();
- i != sources.end();
- i++, x++)
+ foreach (const path& path, sources)
if (x == xact.entry->src_idx) {
- file = *i;
+ file = path;
break;
}
line = xact.beg_line;