From 794027239d80aab1d546484d163884a783f7db7b Mon Sep 17 00:00:00 2001 From: "Vladimir (Alkenso)" Date: Fri, 26 Jul 2019 13:32:00 +0300 Subject: [PATCH] Updated example code --- include/asenum/asenum.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/asenum/asenum.h b/include/asenum/asenum.h index 18fbc54..04d351f 100644 --- a/include/asenum/asenum.h +++ b/include/asenum/asenum.h @@ -58,7 +58,7 @@ }; //===== USAGE ===== - void LogSetting(const AnyError& event) + void LogError(const AnyError& event) { event.doSwitch() .asCase([] (const std::string& value) { @@ -111,15 +111,15 @@ int main() { // ===== CREATION ===== - LogSetting(AnyError::createUnknown("test.api.com")); - LogSetting(AnyError::createSuccess()); - LogSetting(AnyError::createTimeout(std::chrono::seconds(1))); + LogError(AnyError::createUnknown("test.api.com")); + LogError(AnyError::createSuccess()); + LogError(AnyError::createTimeout(std::chrono::seconds(1))); // === vs === - LogSetting(AnyError::create("test.api.com")); - LogSetting(AnyError::create()); - LogSetting(AnyError::create(std::chrono::seconds(1))); + LogError(AnyError::create("test.api.com")); + LogError(AnyError::create()); + LogError(AnyError::create(std::chrono::seconds(1))); return 0; }