summaryrefslogtreecommitdiff
path: root/plugins/Popup/src/formula.h
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-12-21 08:17:45 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-12-21 08:17:45 +0000
commitb3ded48d866f59df3c9e8634eabe6e62596ad2d5 (patch)
treea7a9f2cdd1a9846b7445e8ec6babbecee79c8c0b /plugins/Popup/src/formula.h
parentb2ba573600e650273800774c7fad23268019a353 (diff)
Popup: changed warning level to w4
git-svn-id: http://svn.miranda-ng.org/main/trunk@11550 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup/src/formula.h')
-rw-r--r--plugins/Popup/src/formula.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/Popup/src/formula.h b/plugins/Popup/src/formula.h
index 67cea481c9..7be33d1d23 100644
--- a/plugins/Popup/src/formula.h
+++ b/plugins/Popup/src/formula.h
@@ -2,9 +2,9 @@
Popup Plus plugin for Miranda IM
Copyright © 2002 Luca Santarelli,
- © 2004-2007 Victor Pavlychko
- © 2010 MPK
- © 2010 Merlin_de
+© 2004-2007 Victor Pavlychko
+© 2010 MPK
+© 2010 Merlin_de
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -35,18 +35,18 @@ public:
char *name;
int value;
Item *next;
-
- Item(char *aName, int aValue, Item *aNext): value(aValue), next(aNext) { name = aName ? mir_strdup(aName) : 0; }
+
+ Item(char *aName, int aValue, Item *aNext) : value(aValue), next(aNext) { name = aName ? mir_strdup(aName) : 0; }
~Item() { if (name) mir_free(name); }
};
Item *items;
public:
- Args():items(0){}
- ~Args(){clear();}
+ Args() :items(0){}
+ ~Args(){ clear(); }
void add(char *name, int value)
{
for (Item *p = items; p; p = p->next)
- if (!mir_strcmp(p->name,name))
+ if (!mir_strcmp(p->name, name))
{
p->value = value;
return;
@@ -56,7 +56,7 @@ public:
int get(char *name)
{
for (Item *p = items; p; p = p->next)
- if (!mir_strcmp(p->name,name))
+ if (!mir_strcmp(p->name, name))
return p->value;
return 0;
}
@@ -73,16 +73,16 @@ public:
private:
TCHAR *m_str;
- int eval_neq (TCHAR *&s, Args *args, bool *vars) const;
+ int eval_neq(TCHAR *&s, Args *args, bool *vars) const;
int eval_sum(TCHAR *&s, Args *args, bool *vars) const;
int eval_mul(TCHAR *&s, Args *args, bool *vars) const;
int eval_atom(TCHAR *&s, Args *args, bool *vars) const;
public:
- Formula():m_str(mir_tstrdup(_T(""))) {}
- Formula(TCHAR *s):m_str(mir_tstrdup(s)) {}
- ~Formula() {mir_free(m_str);}
- void set(TCHAR *s){mir_free(m_str);m_str=mir_tstrdup(s);}
+ Formula() :m_str(mir_tstrdup(_T(""))) {}
+ Formula(TCHAR *s) :m_str(mir_tstrdup(s)) {}
+ ~Formula() { mir_free(m_str); }
+ void set(TCHAR *s){ mir_free(m_str); m_str = mir_tstrdup(s); }
int eval(Args *args, bool *vars = 0) const;
};