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 <cmake.h>
|
||||||
|
#include <iostream> // TODO Remove.
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
@ -54,16 +55,15 @@ Variant::Variant ()
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
Variant::Variant (const Variant& other)
|
Variant::Variant (const Variant& other)
|
||||||
: _type (type_unknown)
|
: _type (other._type)
|
||||||
, _bool (false)
|
, _bool (other._bool)
|
||||||
, _integer (0)
|
, _integer (other._integer)
|
||||||
, _real (0.0)
|
, _real (other._real)
|
||||||
, _string ("")
|
, _string (other._string)
|
||||||
, _date (0)
|
, _date (other._date)
|
||||||
, _duration (0)
|
, _duration (other._duration)
|
||||||
, _source ("")
|
, _source (other._source)
|
||||||
{
|
{
|
||||||
*this = other;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue