Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove _Ptr(_Const) typedefs #2798

Closed
wants to merge 2 commits into from
Closed

Remove _Ptr(_Const) typedefs #2798

wants to merge 2 commits into from

Conversation

glebm
Copy link
Contributor

@glebm glebm commented Dec 20, 2018

Removes these typedefs because pointers should be handled with care. Having them visually stand out in the code helps us avoid common pitfalls, such as accidentally using Ptr instead of Obj.

This change has been automatically generated using the following command:

find src \( -name '*.cpp' -o -name '*.hpp' \) -exec sed -i \
'/typedef.*_Ptr[_;]/d;'\
's/\([A-Za-z_]*\)_Ptr_Const/const \1*/g;'\
's/\([A-Za-z_]*\)_Ptr/\1*/g;'\
's/\([a-z]\)##\*/\1*/g' '{}' \+

Fixes #2785

The `const` there was useless, as it didn't meant the constness of
Expression, but merely that Expression could not be reassigned.
Removes these typedefs because pointers should be handled with care.
Having them visually stand out in the code helps us avoid common
pitfalls, such as accidentally using `Ptr` instead of `Obj`.

This change has been automatically generated using the following command:

```bash
find src \( -name '*.cpp' -o -name '*.hpp' \) -exec sed -i \
'/typedef.*_Ptr[_;]/d;'\
's/\([A-Za-z_]*\)_Ptr_Const/const \1*/g;'\
's/\([A-Za-z_]*\)_Ptr/\1*/g;'\
's/\([a-z]\)##\*/\1*/g' '{}' \+
```

Fixes sass#2785
@glebm
Copy link
Contributor Author

glebm commented Dec 20, 2018

Will reopen once ast_node_to_sass_value is fixed.

@glebm glebm closed this Dec 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant