Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sass
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
楚学文
node-sass
Commits
f9964c87
Commit
f9964c87
authored
May 25, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
All warnings gone!
parent
2730e08a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
document.cpp
document.cpp
+7
-3
functions.cpp
functions.cpp
+1
-1
node.cpp
node.cpp
+4
-2
No files found.
document.cpp
View file @
f9964c87
...
...
@@ -32,11 +32,15 @@ namespace Sass {
f
=
std
::
fopen
(
path
.
c_str
(),
"rb"
);
if
(
!
f
)
throw
path
;
if
(
std
::
fseek
(
f
,
0
,
SEEK_END
))
throw
path
;
int
len
=
std
::
ftell
(
f
);
if
(
len
<
0
)
throw
path
;
int
status
=
std
::
ftell
(
f
);
if
(
status
<
0
)
throw
path
;
size_t
len
=
status
;
std
::
rewind
(
f
);
char
*
source
=
new
char
[
len
+
1
];
std
::
fread
(
source
,
sizeof
(
char
),
len
,
f
);
size_t
bytes_read
=
std
::
fread
(
source
,
sizeof
(
char
),
len
,
f
);
if
(
bytes_read
!=
len
)
{
std
::
cerr
<<
"Warning: possible error reading from "
<<
path
<<
std
::
endl
;
}
if
(
std
::
ferror
(
f
))
throw
path
;
source
[
len
]
=
'\0'
;
char
*
end
=
source
+
len
;
...
...
functions.cpp
View file @
f9964c87
...
...
@@ -472,7 +472,7 @@ namespace Sass {
if
(
l1
.
type
()
!=
Node
::
nil
)
size
+=
l1
.
size
();
if
(
l2
.
type
()
!=
Node
::
nil
)
size
+=
l2
.
size
();
// figure out the result type in advance
Node
::
Type
rtype
;
Node
::
Type
rtype
=
Node
::
space_list
;
if
(
has_sep
)
{
string
sep
(
bindings
[
parameters
[
2
]].
token
().
unquote
());
if
(
sep
==
"comma"
)
rtype
=
Node
::
comma_list
;
...
...
node.cpp
View file @
f9964c87
...
...
@@ -90,8 +90,8 @@ namespace Sass {
Type
lhs_type
=
type
();
Type
rhs_type
=
rhs
.
type
();
if
(
lhs_type
==
number
&&
rhs_type
==
number
||
lhs_type
==
numeric_percentage
&&
rhs_type
==
numeric_percentage
)
{
if
(
(
lhs_type
==
number
&&
rhs_type
==
number
)
||
(
lhs_type
==
numeric_percentage
&&
rhs_type
==
numeric_percentage
)
)
{
return
numeric_value
()
<
rhs
.
numeric_value
();
}
else
if
(
lhs_type
==
numeric_dimension
&&
rhs_type
==
numeric_dimension
)
{
...
...
@@ -243,6 +243,8 @@ namespace Sass {
break
;
// throw an exception?
}
// if you reach this point, you've got a logic error somewhere
return
0
;
}
extern
const
char
percent_str
[]
=
"%"
;
...
...
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