mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-02 05:30:23 +02:00
- Changes necessary for a clean build on Fedora9.
This commit is contained in:
parent
e392b8a95e
commit
cb4f86e9f1
8 changed files with 50 additions and 40 deletions
12
src/Date.cpp
12
src/Date.cpp
|
@ -5,6 +5,8 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
#include <iostream>
|
||||
#include <time.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include "task.h"
|
||||
#include "Date.h"
|
||||
|
||||
|
@ -36,8 +38,8 @@ Date::Date (const int m, const int d, const int y)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
Date::Date (const std::string& mdy)
|
||||
{
|
||||
unsigned int firstSlash = mdy.find ("/");
|
||||
unsigned int secondSlash = mdy.find ("/", firstSlash + 1);
|
||||
size_t firstSlash = mdy.find ("/");
|
||||
size_t secondSlash = mdy.find ("/", firstSlash + 1);
|
||||
if (firstSlash != std::string::npos &&
|
||||
secondSlash != std::string::npos)
|
||||
{
|
||||
|
@ -155,7 +157,7 @@ int Date::daysInMonth (int month, int year)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string Date::monthName (int month)
|
||||
{
|
||||
static char* months[12] =
|
||||
static const char* months[12] =
|
||||
{
|
||||
"January",
|
||||
"February",
|
||||
|
@ -179,7 +181,7 @@ std::string Date::monthName (int month)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Date::dayName (int dow, std::string& name)
|
||||
{
|
||||
static char* days[7] =
|
||||
static const char* days[7] =
|
||||
{
|
||||
"Sunday",
|
||||
"Monday",
|
||||
|
@ -196,7 +198,7 @@ void Date::dayName (int dow, std::string& name)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string Date::dayName (int dow)
|
||||
{
|
||||
static char* days[7] =
|
||||
static const char* days[7] =
|
||||
{
|
||||
"Sunday",
|
||||
"Monday",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue