mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
- Get rid of unneeded time_type typedef.
- MSVC compile fix. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21857 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f3a4424408
commit
06d65218c0
@ -35,7 +35,7 @@ public:
|
||||
DELETED // deleted text
|
||||
};
|
||||
|
||||
explicit Change(Type t, int a = 0, time_type ct = current_time())
|
||||
explicit Change(Type t, int a = 0, time_t ct = current_time())
|
||||
: type(t), author(a), changetime(ct) {}
|
||||
|
||||
/// is the change similar to the given change such that both can be merged?
|
||||
@ -45,7 +45,7 @@ public:
|
||||
|
||||
int author;
|
||||
|
||||
time_type changetime;
|
||||
time_t changetime;
|
||||
};
|
||||
|
||||
bool operator==(Change const & l, Change const & r);
|
||||
|
@ -262,7 +262,7 @@ void readParToken(Buffer const & buf, Paragraph & par, Lexer & lex,
|
||||
lex.eatLine();
|
||||
std::istringstream is(lex.getString());
|
||||
unsigned int aid;
|
||||
time_type ct;
|
||||
time_t ct;
|
||||
is >> aid >> ct;
|
||||
if (aid >= bp.author_map.size()) {
|
||||
errorList.push_back(ErrorItem(_("Change tracking error"),
|
||||
@ -275,7 +275,7 @@ void readParToken(Buffer const & buf, Paragraph & par, Lexer & lex,
|
||||
lex.eatLine();
|
||||
std::istringstream is(lex.getString());
|
||||
unsigned int aid;
|
||||
time_type ct;
|
||||
time_t ct;
|
||||
is >> aid >> ct;
|
||||
if (aid >= bp.author_map.size()) {
|
||||
errorList.push_back(ErrorItem(_("Change tracking error"),
|
||||
|
@ -16,13 +16,13 @@ using std::string;
|
||||
|
||||
namespace lyx {
|
||||
|
||||
time_type current_time()
|
||||
time_t current_time()
|
||||
{
|
||||
return time(0);
|
||||
}
|
||||
|
||||
|
||||
string const formatted_time(time_type t, string const & fmt)
|
||||
string const formatted_time(time_t t, string const & fmt)
|
||||
{
|
||||
struct tm * loc_tm = localtime(&t);
|
||||
char date[50];
|
||||
|
@ -19,15 +19,13 @@
|
||||
|
||||
namespace lyx {
|
||||
|
||||
typedef time_t time_type;
|
||||
|
||||
time_type current_time();
|
||||
time_t current_time();
|
||||
|
||||
/** Returns a locale-dependent formatting of the date
|
||||
* and time encoded in \c time. The \p fmt string
|
||||
* holds the formatting arguments of \c strftime.
|
||||
*/
|
||||
std::string const formatted_time(time_type t, std::string const & fmt);
|
||||
std::string const formatted_time(time_t t, std::string const & fmt);
|
||||
|
||||
}; // namespace lyx
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <iomanip>
|
||||
#include <ostream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
using std::endl;
|
||||
using std::map;
|
||||
|
Loading…
Reference in New Issue
Block a user