13
0

Fix time_t <> long int ambiguity (OSX gcc builds)

This fixes an issue with
* XMLNode::get_property(const char*, T&)
* XMLNode::set_property(const char*, const T&)
resulting in
 string_convert.h:77: error: 'long int' is not a class,
 struct, or union type
This commit is contained in:
Robin Gareus 2019-07-26 01:58:01 +02:00
parent c81cbd8f30
commit 7cf68eaf72
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 6 additions and 7 deletions

View File

@ -23,7 +23,6 @@
#include <list>
#include <iostream>
#include <map>
#include <ctime>
#include <sys/types.h>
@ -70,7 +69,7 @@ public:
void lock ();
void unlock ();
time_t timestamp() { return _timestamp; };
int64_t timestamp() const { return _timestamp; };
samplepos_t start() const { return _start; }
samplepos_t end() const { return _end; }
samplecnt_t length() const { return _end - _start; }
@ -162,7 +161,7 @@ private:
bool _locked;
PositionLockStyle _position_lock_style;
boost::shared_ptr<SceneChange> _scene_change;
time_t _timestamp;
int64_t _timestamp;
void set_mark (bool yn);
bool set_flag_internal (bool yn, Flags flag);

View File

@ -65,7 +65,7 @@ Location::Location (Session& s)
, _flags (Flags (0))
, _locked (false)
, _position_lock_style (AudioTime)
, _timestamp(time(0))
, _timestamp (time (0))
{
assert (_start >= 0);
assert (_end >= 0);
@ -80,7 +80,7 @@ Location::Location (Session& s, samplepos_t sample_start, samplepos_t sample_end
, _flags (bits)
, _locked (false)
, _position_lock_style (s.config.get_glue_new_markers_to_bars_and_beats() ? MusicTime : AudioTime)
, _timestamp(time(0))
, _timestamp (time (0))
{
recompute_beat_from_samples (sub_num);
@ -98,7 +98,7 @@ Location::Location (const Location& other)
, _end_beat (other._end_beat)
, _flags (other._flags)
, _position_lock_style (other._position_lock_style)
, _timestamp(time(0))
, _timestamp (time (0))
{
/* copy is not locked even if original was */
@ -114,7 +114,7 @@ Location::Location (Session& s, const XMLNode& node)
: SessionHandleRef (s)
, _flags (Flags (0))
, _position_lock_style (AudioTime)
, _timestamp(time(0))
, _timestamp (time (0))
{
/* Note: _position_lock_style is initialised above in case set_state doesn't set it
(for 2.X session file compatibility).