Do not pollute the name space. #38

Closed
wengxt opened this Issue Mar 9, 2013 · 5 comments

Comments

Projects
None yet
2 participants
@wengxt

wengxt commented Mar 9, 2013

This is only a bad coding style problem, though not very important right now.

pinyin.h contains a using namespace pinyin, which will introduce an additional c++ namespace.

@epico

This comment has been minimized.

Show comment Hide comment
@epico

epico Mar 12, 2013

Owner

Actually in pinyin.h, only "novel_types.h", "pinyin_custom2.h" and "chewing_key.h" are included...

Owner

epico commented Mar 12, 2013

Actually in pinyin.h, only "novel_types.h", "pinyin_custom2.h" and "chewing_key.h" are included...

@wengxt

This comment has been minimized.

Show comment Hide comment
@wengxt

wengxt Mar 12, 2013

the problem is "using namespace". not the included file.

put "using namespace" in a header is not a good practice for either library and normal code.

using namespace should be only used in cpp file.

wengxt commented Mar 12, 2013

the problem is "using namespace". not the included file.

put "using namespace" in a header is not a good practice for either library and normal code.

using namespace should be only used in cpp file.

@epico

This comment has been minimized.

Show comment Hide comment
@epico

epico Mar 12, 2013

Owner

I did a quick fixes for pinyin.h in epico/libpinyin@22df46a.

Owner

epico commented Mar 12, 2013

I did a quick fixes for pinyin.h in epico/libpinyin@22df46a.

@epico

This comment has been minimized.

Show comment Hide comment
@epico

epico Mar 15, 2013

Owner

Please add "using namespace pinyin;" to your cpp files. thanks

Owner

epico commented Mar 15, 2013

Please add "using namespace pinyin;" to your cpp files. thanks

@epico

This comment has been minimized.

Show comment Hide comment
@epico

epico Mar 19, 2013

Owner

As libpinyin 0.8.93 released, close issue.

Owner

epico commented Mar 19, 2013

As libpinyin 0.8.93 released, close issue.

@epico epico closed this Mar 19, 2013

@epico epico referenced this issue in libpinyin/ibus-libpinyin Mar 20, 2013

Closed

1.5.91 could not build again libpinyin 0.8.93 #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment