From adee7d134fb6a98df18a6276fbf28be738f7c576 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Mon, 10 May 2021 20:05:55 +0200 Subject: [PATCH] added macro PT_HAS_MORM in Log class where operator<<(morm::Model & model) is used --- src/log/log.cpp | 9 +++++---- src/log/log.h | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/log/log.cpp b/src/log/log.cpp index 82336e3..757c9cb 100644 --- a/src/log/log.cpp +++ b/src/log/log.cpp @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2018, Tomasz Sowa + * Copyright (c) 2018-2021, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,8 +41,9 @@ #include "date/date.h" #include "utf8/utf8.h" +#ifdef PT_HAS_MORM #include "morm.h" - +#endif namespace PT { @@ -312,13 +313,13 @@ Log & Log::operator<<(const PT::Date & date) } - +#ifdef PT_HAS_MORM Log & Log::operator<<(morm::Model & model) { operator<<(model.to_string()); return *this; } - +#endif Log & Log::operator<<(Manipulators m) diff --git a/src/log/log.h b/src/log/log.h index c5d72bb..891fb6d 100644 --- a/src/log/log.h +++ b/src/log/log.h @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2018, Tomasz Sowa + * Copyright (c) 2018-2021, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -131,8 +131,9 @@ public: virtual Log & operator<<(const PT::Space & space); virtual Log & operator<<(const PT::Date & date); +#ifdef PT_HAS_MORM virtual Log & operator<<(morm::Model & model); - +#endif virtual Log & operator<<(Manipulators m);