Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
pikelang
pike
Commits
6eb7fe44
Commit
6eb7fe44
authored
Jul 24, 2020
by
Henrik (Grubba) Grubbström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Val: Fixed multiple warnings.
parent
5fe1e778
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
lib/modules/Val.pmod/module.pmod
lib/modules/Val.pmod/module.pmod
+7
-7
No files found.
lib/modules/Val.pmod/module.pmod
View file @
6eb7fe44
...
...
@@ -594,7 +594,7 @@ class Interval {
months = copy->months;
}
protected
mixed `*(mixed
that) {
protected
this_program `*(int|float
that) {
this_program n = this_program(this);
if (intp(that)) {
n->nsecs *= [int]that;
...
...
@@ -611,7 +611,7 @@ class Interval {
return n;
}
protected
mixed `/(mixed
that) {
protected
this_program `/(int|float
that) {
if (!intp(that) && !floatp(that))
error("Cannot divide by %O\n", that);
this_program n = this_program(this);
...
...
@@ -623,17 +623,17 @@ class Interval {
return n;
}
protected mixed `+(
mixed
that) {
protected mixed `+(
this_program
that) {
if (!objectp(that) || !([object]that)->is_interval)
error("Cannot add %O\n", that);
this_program n = this_program(this);
n->nsecs +=
([object(this_program)]
that
)
->nsecs;
n->days +=
([object(this_program)]
that
)
->days;
n->months +=
([object(this_program)]
that
)
->months;
n->nsecs += that->nsecs;
n->days += that->days;
n->months += that->months;
return n;
}
protected
mixed `-(void|mixed
that) {
protected
this_program `-(void|this_program
that) {
this_program n = this_program(this);
if (zero_type(that)) {
n->nsecs = -n->nsecs;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment