diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-08-25 13:02:13 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2015-08-25 13:02:13 -0400 |
commit | 55110bae04cd5c9d5dc639d8fbe4cd6a73926176 (patch) | |
tree | 089e55224407496da18fadd38da9a3c33e9d91aa /dist/stat.py | |
parent | 57d9822481430da8fa16f3f355a0388f63dfed59 (diff) | |
download | mongo-55110bae04cd5c9d5dc639d8fbe4cd6a73926176.tar.gz |
Make the generated code a little easier to read, don't split lines
unless we need to.
Diffstat (limited to 'dist/stat.py')
-rw-r--r-- | dist/stat.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/dist/stat.py b/dist/stat.py index f1a09ea4b3e..c9684665a53 100644 --- a/dist/stat.py +++ b/dist/stat.py @@ -165,7 +165,9 @@ __wt_stat_''' + name + '''_aggregate_single( o = '\tif (from->' + l.name + ' > to->' + l.name + ')\n' +\ '\t\tto->' + l.name + ' = from->' + l.name + ';\n' else: - o = '\tto->' + l.name + ' +=\n\t from->' + l.name + ';\n' + o = '\tto->' + l.name + ' += from->' + l.name + ';\n' + if len(o) > 72: # Account for the leading tab. + o = o.replace(' += ', ' +=\n\t ') f.write(o) f.write('}\n') @@ -190,8 +192,9 @@ __wt_stat_''' + name + '''_aggregate( '\t to->' + l.name + ')\n' +\ '\t\tto->' + l.name + ' = v;\n' else: - o = '\tto->' + l.name +\ - ' +=\n\t WT_STAT_READ(from, ' + l.name + ');\n' + o = '\tto->' + l.name + ' += WT_STAT_READ(from, ' + l.name + ');\n' + if len(o) > 72: # Account for the leading tab. + o = o.replace(' += ', ' +=\n\t ') f.write(o) f.write('}\n') |