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

replaced boost::regex with std::regex #846

Merged
merged 1 commit into from Apr 27, 2016

Conversation

Projects
None yet
5 participants
@Speciesx
Contributor

Speciesx commented Apr 25, 2016

I've replaced boost::regex, boost::smatch and boost::ssub_match with std and yes, ror still works.

@tritonas00

This comment has been minimized.

Show comment
Hide comment
@tritonas00

tritonas00 Apr 25, 2016

Collaborator

Nice! Anything else left that needs boost?

Collaborator

tritonas00 commented Apr 25, 2016

Nice! Anything else left that needs boost?

@Speciesx

This comment has been minimized.

Show comment
Hide comment
@Speciesx

Speciesx Apr 26, 2016

Contributor

Nice! Anything else left that needs boost?

apart from Ogre, MyGUI, Caelum and PagedGeometry.

source\main\physics\collision\CartesianToTriangleTransform.h(137):    mutable boost::optional<Ogre::Matrix3> m_matrix;  ///< Cached transformation matrix.
source\main\physics\collision\Triangle.h(58):  mutable boost::optional<Ogre::Vector3> m_normal;  ///< Cached normal vector
source\main\gui\panels\GUI_GameSettings.cpp(1076):              if (boost::starts_with(Application::GetInputEngine()->eventIDToName(mapIt->first).c_str(), m_keymap_group->getCaption()))
source\main\gui\panels\GUI_GameSettings.cpp(1083):          catch (boost::bad_lexical_cast) {
source\main\gui\panels\GUI_GameSettings.cpp(1125):              if (boost::starts_with(Application::GetInputEngine()->eventIDToName(mapIt->first).c_str(), _sender->getItemNameAt(_index)))
source\main\gui\panels\GUI_GameSettings.cpp(1132):          catch (boost::bad_lexical_cast) {
source\main\gui\Console.cpp(291):                   gValue = boost::lexical_cast<float>(args[1].c_str());
source\main\gui\Console.cpp(307):               water->setHeight(boost::lexical_cast<float>(args[1].c_str()));
Contributor

Speciesx commented Apr 26, 2016

Nice! Anything else left that needs boost?

apart from Ogre, MyGUI, Caelum and PagedGeometry.

source\main\physics\collision\CartesianToTriangleTransform.h(137):    mutable boost::optional<Ogre::Matrix3> m_matrix;  ///< Cached transformation matrix.
source\main\physics\collision\Triangle.h(58):  mutable boost::optional<Ogre::Vector3> m_normal;  ///< Cached normal vector
source\main\gui\panels\GUI_GameSettings.cpp(1076):              if (boost::starts_with(Application::GetInputEngine()->eventIDToName(mapIt->first).c_str(), m_keymap_group->getCaption()))
source\main\gui\panels\GUI_GameSettings.cpp(1083):          catch (boost::bad_lexical_cast) {
source\main\gui\panels\GUI_GameSettings.cpp(1125):              if (boost::starts_with(Application::GetInputEngine()->eventIDToName(mapIt->first).c_str(), _sender->getItemNameAt(_index)))
source\main\gui\panels\GUI_GameSettings.cpp(1132):          catch (boost::bad_lexical_cast) {
source\main\gui\Console.cpp(291):                   gValue = boost::lexical_cast<float>(args[1].c_str());
source\main\gui\Console.cpp(307):               water->setHeight(boost::lexical_cast<float>(args[1].c_str()));
@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Apr 26, 2016

Contributor

Boost for Ogre is optional and a GitHub search for 'boost' only turns up the CMakeFiles in Paged Geometry and Caelum but no code so maybe it can simply be removed.

Contributor

Hiradur commented Apr 26, 2016

Boost for Ogre is optional and a GitHub search for 'boost' only turns up the CMakeFiles in Paged Geometry and Caelum but no code so maybe it can simply be removed.

@tritonas00

This comment has been minimized.

Show comment
Hide comment
@tritonas00

tritonas00 Apr 26, 2016

Collaborator

Ogre, Paged Geometry and MyGUI builds fine without boost. Caelum not :P

Collaborator

tritonas00 commented Apr 26, 2016

Ogre, Paged Geometry and MyGUI builds fine without boost. Caelum not :P

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Apr 26, 2016

Contributor

Caelum not :P

Does the compiler or CMake complain?

Contributor

Hiradur commented Apr 26, 2016

Caelum not :P

Does the compiler or CMake complain?

@Speciesx

This comment has been minimized.

Show comment
Hide comment
@Speciesx

Speciesx Apr 26, 2016

Contributor

Boost for Ogre is optional and a GitHub search for 'boost' only turns up the CMakeFiles in Paged Geometry and Caelum but no code so maybe it can just be removed.

I've also noticed that boost nowhere used in Caelum and PagedGeometry.

Contributor

Speciesx commented Apr 26, 2016

Boost for Ogre is optional and a GitHub search for 'boost' only turns up the CMakeFiles in Paged Geometry and Caelum but no code so maybe it can just be removed.

I've also noticed that boost nowhere used in Caelum and PagedGeometry.

@tritonas00

This comment has been minimized.

Show comment
Hide comment
@tritonas00

tritonas00 Apr 26, 2016

Collaborator

@Hiradur

After removing boost from cmake, it fails here https://github.com/RigsOfRods/ogre-caelum/blob/master/main/src/InternalUtilities.cpp#L78

I removed that function and compiles fine, but dont know if it works xD

Collaborator

tritonas00 commented Apr 26, 2016

@Hiradur

After removing boost from cmake, it fails here https://github.com/RigsOfRods/ogre-caelum/blob/master/main/src/InternalUtilities.cpp#L78

I removed that function and compiles fine, but dont know if it works xD

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr

only-a-ptr Apr 27, 2016

Member

@tritonas00 The function that uses it: https://github.com/RigsOfRods/ogre-caelum/blob/master/main/src/InternalUtilities.cpp#L70-L80 is apparently supposed to convert a void+ pointer to string, but does so in a very convoluted manner. It should be done like this: http://stackoverflow.com/a/1255185

Please research where that function is used (if anywhere) and fix it.

But since it compiled without the function, I guess not. In that case, don't forget to remove it from the header, too.

Member

only-a-ptr commented Apr 27, 2016

@tritonas00 The function that uses it: https://github.com/RigsOfRods/ogre-caelum/blob/master/main/src/InternalUtilities.cpp#L70-L80 is apparently supposed to convert a void+ pointer to string, but does so in a very convoluted manner. It should be done like this: http://stackoverflow.com/a/1255185

Please research where that function is used (if anywhere) and fix it.

But since it compiled without the function, I guess not. In that case, don't forget to remove it from the header, too.

@tritonas00

This comment has been minimized.

Show comment
Hide comment
@tritonas00

tritonas00 Apr 27, 2016

Collaborator

@Hiradur already helped me with that with #include <cstddef>

I created a pr RigsOfRods/ogre-caelum#1

Collaborator

tritonas00 commented Apr 27, 2016

@Hiradur already helped me with that with #include <cstddef>

I created a pr RigsOfRods/ogre-caelum#1

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr

only-a-ptr Apr 27, 2016

Member

Anyway, 👍

Member

only-a-ptr commented Apr 27, 2016

Anyway, 👍

@ulteq ulteq merged commit 6dfe879 into RigsOfRods:master Apr 27, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Speciesx Speciesx deleted the Speciesx:boost_regex-to-std branch May 1, 2016

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