diff options
author | monty@mashka.mysql.fi <> | 2002-08-08 03:29:36 +0300 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2002-08-08 03:29:36 +0300 |
commit | 1bb7665a9c4405439b89dfc2c621d22f5275beec (patch) | |
tree | da5d29e4a08217e2773b16c5aef05ab734c760e4 /sql/item_timefunc.h | |
parent | a4b77125fd05de4a00b0d648649014fa1bb2d4bb (diff) | |
parent | 2c4fa340cccbf11dc7b7f944cf7ca30af48edf4f (diff) | |
download | mariadb-git-1bb7665a9c4405439b89dfc2c621d22f5275beec.tar.gz |
merge
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r-- | sql/item_timefunc.h | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index d867433ef91..4478c3df266 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -242,8 +242,7 @@ public: } Field *tmp_table_field(TABLE *t_arg) { - if (!t_arg) return result_field; - return new Field_date(maybe_null, name, t_arg); + return (!t_arg) ? result_field : new Field_date(maybe_null, name, t_arg); } unsigned int size_of() { return sizeof(*this);} }; @@ -261,9 +260,9 @@ public: } Field *tmp_table_field(TABLE *t_arg) { - if (!t_arg) return result_field; - return new Field_datetime(maybe_null, name, t_arg); - } + return (!t_arg) ? result_field : new Field_datetime(maybe_null, name, + t_arg); + } unsigned int size_of() { return sizeof(*this);} }; @@ -289,8 +288,7 @@ public: } Field *tmp_table_field(TABLE *t_arg) { - if (!t_arg) return result_field; - return new Field_time(maybe_null, name, t_arg); + return (!t_arg) ? result_field : new Field_time(maybe_null, name, t_arg); } unsigned int size_of() { return sizeof(*this);} }; @@ -386,11 +384,11 @@ public: } Field *tmp_table_field(TABLE *t_arg) { - if (!t_arg) return result_field; - return new Field_time(maybe_null, name, t_arg); - } + return (!t_arg) ? result_field : new Field_time(maybe_null, name, t_arg); + } }; + enum interval_type { INTERVAL_YEAR, INTERVAL_MONTH, INTERVAL_DAY, INTERVAL_HOUR, INTERVAL_MINUTE, INTERVAL_SECOND, INTERVAL_YEAR_MONTH, INTERVAL_DAY_HOUR, @@ -452,8 +450,7 @@ public: } Field *tmp_table_field(TABLE *t_arg) { - if (!t_arg) return result_field; - return new Field_date(maybe_null, name, t_arg); + return (!t_arg) ? result_field : new Field_date(maybe_null, name, t_arg); } }; @@ -468,9 +465,8 @@ public: } Field *tmp_table_field(TABLE *t_arg) { - if (!t_arg) return result_field; - return new Field_time(maybe_null, name, t_arg); - } + return (!t_arg) ? result_field : new Field_time(maybe_null, name, t_arg); + } }; class Item_datetime_typecast :public Item_typecast @@ -484,7 +480,7 @@ public: } Field *tmp_table_field(TABLE *t_arg) { - if (!t_arg) return result_field; - return new Field_datetime(maybe_null, name, t_arg); - } + return (!t_arg) ? result_field : new Field_datetime(maybe_null, name, + t_arg); + } }; |