CID 9835 UNINIT_CTOR - removing leftovers from 12/24 interval option
CID 8960 STRING_OVERFLOW CID 6788, 6789 SECURE_CODING git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40657 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c0107fb2bf
commit
1fc4ba42c2
@ -80,6 +80,8 @@ TTimeView::TTimeView(float maxWidth, float height, bool showSeconds,
|
||||
{
|
||||
fTime = fLastTime = time(NULL);
|
||||
fSeconds = fMinute = fHour = 0;
|
||||
fTimeStr[0] = 0;
|
||||
fDateStr[0] = 0;
|
||||
fLastTimeStr[0] = 0;
|
||||
fLastDateStr[0] = 0;
|
||||
fNeedToUpdate = true;
|
||||
@ -94,7 +96,6 @@ TTimeView::TTimeView(BMessage* data)
|
||||
{
|
||||
fTime = fLastTime = time(NULL);
|
||||
data->FindBool("seconds", &fShowSeconds);
|
||||
data->FindBool("interval", &fInterval);
|
||||
|
||||
fLocale = *BLocale::Default();
|
||||
}
|
||||
@ -122,7 +123,6 @@ TTimeView::Archive(BMessage* data, bool deep) const
|
||||
{
|
||||
BView::Archive(data, deep);
|
||||
data->AddBool("seconds", fShowSeconds);
|
||||
data->AddBool("interval", fInterval);
|
||||
data->AddInt32("deskbar:private_align", B_ALIGN_RIGHT);
|
||||
|
||||
return B_OK;
|
||||
@ -268,7 +268,7 @@ TTimeView::GetCurrentDate()
|
||||
if (str[0] == '0')
|
||||
str++;
|
||||
|
||||
strcpy(fDateStr, str);
|
||||
strlcpy(fDateStr, str, sizeof(fDateStr));
|
||||
}
|
||||
|
||||
|
||||
@ -329,8 +329,8 @@ TTimeView::Pulse()
|
||||
|| !fLastTimeStr[0])
|
||||
Update();
|
||||
|
||||
strcpy(fLastTimeStr, fTimeStr);
|
||||
strcpy(fLastDateStr, fDateStr);
|
||||
strlcpy(fLastTimeStr, fTimeStr, sizeof(fLastTimeStr));
|
||||
strlcpy(fLastDateStr, fDateStr, sizeof(fLastDateStr));
|
||||
fNeedToUpdate = true;
|
||||
}
|
||||
|
||||
@ -338,7 +338,6 @@ TTimeView::Pulse()
|
||||
fSeconds = ct->tm_sec;
|
||||
fMinute = ct->tm_min;
|
||||
fHour = ct->tm_hour;
|
||||
fInterval = ct->tm_hour >= 12;
|
||||
|
||||
Draw(Bounds());
|
||||
fNeedToUpdate = false;
|
||||
|
@ -103,7 +103,6 @@ class TTimeView : public BView {
|
||||
int fSeconds;
|
||||
int fMinute;
|
||||
int fHour;
|
||||
bool fInterval;
|
||||
|
||||
bool fShowInterval;
|
||||
bool fShowSeconds;
|
||||
|
Loading…
Reference in New Issue
Block a user