diff options
author | fonsinchen <fonsinchen@openttd.org> | 2013-12-20 14:57:44 +0000 |
---|---|---|
committer | fonsinchen <fonsinchen@openttd.org> | 2013-12-20 14:57:44 +0000 |
commit | ec492bfb7700b719e41553417cbe77c5d10549ae (patch) | |
tree | 3e32848d29e0a9326bb9ff373a2248fe7239ca68 /src/linkgraph/flowmapper.h | |
parent | 4818b72c759f3845a28b94d3f1fad9541d4e8304 (diff) | |
download | openttd-ec492bfb7700b719e41553417cbe77c5d10549ae.tar.xz |
(svn r26166) -Fix: Scale flows only after mapping to avoid rounding errors.
Diffstat (limited to 'src/linkgraph/flowmapper.h')
-rw-r--r-- | src/linkgraph/flowmapper.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/linkgraph/flowmapper.h b/src/linkgraph/flowmapper.h index 6dc84ffea..6f874e5b3 100644 --- a/src/linkgraph/flowmapper.h +++ b/src/linkgraph/flowmapper.h @@ -23,12 +23,25 @@ */ class FlowMapper : public ComponentHandler { public: + + /** + * Create a flow mapper. + * @param scale Whether the flow mapper should scale all flows to monthly + * values. Only do that on the very last flow mapping. + */ + FlowMapper(bool scale) : scale(scale) {} virtual void Run(LinkGraphJob &job) const; /** * Virtual destructor has to be defined because of virtual Run(). */ virtual ~FlowMapper() {} +private: + + /** + * Whether the flow mapper should scale all flows to monthly values. + */ + const bool scale; }; #endif /* FLOWMAPPER_H_ */ |