mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Variant
- Improved copy ctor.
This commit is contained in:
parent
e14c867a9b
commit
db0a56e4f5
1 changed files with 9 additions and 9 deletions
|
@ -25,6 +25,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <iostream> // TODO Remove.
|
||||
#include <sstream>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
@ -54,16 +55,15 @@ Variant::Variant ()
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Variant::Variant (const Variant& other)
|
||||
: _type (type_unknown)
|
||||
, _bool (false)
|
||||
, _integer (0)
|
||||
, _real (0.0)
|
||||
, _string ("")
|
||||
, _date (0)
|
||||
, _duration (0)
|
||||
, _source ("")
|
||||
: _type (other._type)
|
||||
, _bool (other._bool)
|
||||
, _integer (other._integer)
|
||||
, _real (other._real)
|
||||
, _string (other._string)
|
||||
, _date (other._date)
|
||||
, _duration (other._duration)
|
||||
, _source (other._source)
|
||||
{
|
||||
*this = other;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue