Remove the time_t overload of UnknownElement and just cast to int64_t
Originally committed to SVN as r6508.
This commit is contained in:
parent
f54d381f94
commit
6cf122dea2
4 changed files with 6 additions and 15 deletions
|
@ -256,7 +256,6 @@ AS_IF([test x$agi_cv_pragma_once = xno],
|
|||
AC_CHECK_HEADER([wchar.h],,[AC_MSG_FAILURE([aegisub requires wide character support])])
|
||||
|
||||
AC_CHECK_HEADERS([sys/time.h])
|
||||
AC_CHECK_SIZEOF([time_t])
|
||||
|
||||
##############################
|
||||
# Program Support and Features
|
||||
|
|
|
@ -90,10 +90,6 @@ UnknownElement::UnknownElement() : m_pImp(new Imp_T
|
|||
UnknownElement::UnknownElement(const UnknownElement& unknown) : m_pImp(unknown.m_pImp->Clone()) {}
|
||||
UnknownElement::UnknownElement(int number) : m_pImp(new Imp_T<Integer>(number)) {}
|
||||
UnknownElement::UnknownElement(const char *string) : m_pImp(new Imp_T<String>(string)) {}
|
||||
#if SIZEOF_TIME_T+0 == 4
|
||||
UnknownElement::UnknownElement(time_t number) : m_pImp(new Imp_T<Integer>(number)) {}
|
||||
#endif
|
||||
|
||||
UnknownElement::~UnknownElement() { delete m_pImp; }
|
||||
|
||||
#define DEFINE_UE_TYPE(Type) \
|
||||
|
|
|
@ -132,8 +132,8 @@ JsonEmitter::~JsonEmitter() {
|
|||
Sink const& sink = *log_sink->GetSink();
|
||||
for (unsigned int i=0; i < sink.size(); i++) {
|
||||
json::Object entry;
|
||||
entry["sec"] = sink[i]->tv.tv_sec;
|
||||
entry["usec"] = sink[i]->tv.tv_usec;
|
||||
entry["sec"] = (int64_t)sink[i]->tv.tv_sec;
|
||||
entry["usec"] = (int64_t)sink[i]->tv.tv_usec;
|
||||
entry["severity"] = sink[i]->severity;
|
||||
entry["section"] = sink[i]->section;
|
||||
entry["file"] = sink[i]->file;
|
||||
|
@ -145,12 +145,12 @@ JsonEmitter::~JsonEmitter() {
|
|||
}
|
||||
|
||||
json::Array &timeval_open = root["timeval"]["open"];
|
||||
timeval_open.push_back(time_start.tv_sec);
|
||||
timeval_open.push_back(time_start.tv_usec);
|
||||
timeval_open.push_back((int64_t)time_start.tv_sec);
|
||||
timeval_open.push_back((int64_t)time_start.tv_usec);
|
||||
|
||||
json::Array &timeval_close = root["timeval"]["close"];
|
||||
timeval_close.push_back(time_close.tv_sec);
|
||||
timeval_close.push_back(time_close.tv_usec);
|
||||
timeval_close.push_back((int64_t)time_close.tv_sec);
|
||||
timeval_close.push_back((int64_t)time_close.tv_usec);
|
||||
|
||||
std::stringstream str;
|
||||
str << directory << time_start.tv_sec << ".json";
|
||||
|
|
|
@ -77,10 +77,6 @@ public:
|
|||
UnknownElement(const String& string);
|
||||
UnknownElement(const Null& null);
|
||||
|
||||
#if SIZEOF_TIME_T+0 == 4
|
||||
UnknownElement(time_t number);
|
||||
#endif
|
||||
|
||||
~UnknownElement();
|
||||
|
||||
UnknownElement& operator = (const UnknownElement& unknown);
|
||||
|
|
Loading…
Reference in a new issue