From 3af12e60e75a8d6acc5c272c29bf562030f6f975 Mon Sep 17 00:00:00 2001 From: Kristina Chodorow Date: Fri, 10 Apr 2015 17:29:58 +0000 Subject: Remove constructor delegation from example This requires gcc 4.7+ to work, Travis runs gcc 4.6. -- MOS_MIGRATED_REVID=90818739 --- examples/cpp/hello-fail.cc | 2 +- examples/cpp/hello-lib.cc | 3 --- examples/cpp/hello-lib.h | 2 -- 3 files changed, 1 insertion(+), 6 deletions(-) (limited to 'examples/cpp') diff --git a/examples/cpp/hello-fail.cc b/examples/cpp/hello-fail.cc index 5b561cb0ce..5fb2292354 100644 --- a/examples/cpp/hello-fail.cc +++ b/examples/cpp/hello-fail.cc @@ -11,7 +11,7 @@ using std::string; * "test" has failed. */ int main(int argc, char** argv) { - HelloLib lib; + HelloLib lib("Hello"); string thing = "barf"; if (argc > 1) { thing = argv[1]; diff --git a/examples/cpp/hello-lib.cc b/examples/cpp/hello-lib.cc index 8e40921cee..bceb2683d5 100644 --- a/examples/cpp/hello-lib.cc +++ b/examples/cpp/hello-lib.cc @@ -8,9 +8,6 @@ using std::string; namespace hello { -HelloLib::HelloLib() : HelloLib("Hello") { -} - HelloLib::HelloLib(const string& greeting) : greeting_(new string(greeting)) { } diff --git a/examples/cpp/hello-lib.h b/examples/cpp/hello-lib.h index 555d177936..e1fe88d8c7 100644 --- a/examples/cpp/hello-lib.h +++ b/examples/cpp/hello-lib.h @@ -8,8 +8,6 @@ namespace hello { class HelloLib { public: - HelloLib(); - explicit HelloLib(const std::string &greeting); void greet(const std::string &thing); -- cgit v1.2.3