simon-git: spigot (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Fri Aug 2 19:44:50 BST 2019
TL;DR:
e08f2b0 Make Hg's runtime error the right class.
48d2857 Eliminate pointless C++ boilerplate constructors.
Repository: https://git.tartarus.org/simon/spigot.git
On the web: https://git.tartarus.org/?p=simon/spigot.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2019-08-02 19:44:50
commit e08f2b05a29ced6d587f8a461bdbd86bfe816caa
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=e08f2b05a29ced6d587f8a461bdbd86bfe816caa;hp=4703e3e6a5274299236381aeb71b391d670616d8
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Aug 2 19:33:17 2019 +0100
Make Hg's runtime error the right class.
Not that anything spots the difference at the moment, but in case the
distinction becomes useful in future: a primary input value to Hg for
which the hypergeometric series fails to converge should throw
domain_error, not the plain undistinguished spigot_error.
hypergeom.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 48d28572acb0cac28b0bf354e7075ed55c78cce4
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=48d28572acb0cac28b0bf354e7075ed55c78cce4;hp=e08f2b05a29ced6d587f8a461bdbd86bfe816caa
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Aug 2 19:34:35 2019 +0100
Eliminate pointless C++ boilerplate constructors.
I only just found out today that you can make a derived class inherit
the same set of constructors as its base class by just writing
using BaseClass::BaseClass;
and thereby avoid having to imitate each constructor's exact signature
with a trivial forwarder along the lines of
DerivedClass::DerivedClass(type1 v1, type2 v2): BaseClass(v1, v2) {}
So I've switched to using that wherever possible, and removed over 120
lines of completely pointless nonsense from the spigot source!
The only part of this change that wasn't 100% mechanical was that I
chose to make Scope's constructor public instead of protected, so that
DictScope can inherit it unchanged rather than faffing about with
declaring a public constructor of the same signature which forwards to
the protected one in the base class.
error.h | 40 ++++----------------------------
expr.cpp | 79 +++-------------------------------------------------------------
funcs.h | 42 +++++++++++-----------------------
3 files changed, 20 insertions(+), 141 deletions(-)
More information about the tartarus-commits
mailing list