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 istringstream and ostringstream from Position #5232

Closed

Conversation

EarlyEdition
Copy link

The idea of removing (istringstream,ostringstream) was taken from Ronald de Man on Cfish repository.

There were three patterns as follows:

  • string& -> char*
- string& fenStr

+ char* fenStr
  • Remove istringstream
- ss >> token;

+ token = *fenStr++; 
  • Remove ostringstream
- ss << 'Q';

+ *str++ = ('Q');

The flip() function is the only thing left! And i'll do it soon, too.

Copy link

github-actions bot commented May 9, 2024

clang-format 17 needs to be run on this PR.
If you do not have clang-format installed, the maintainer will run it when merging.
For the exact version please see https://packages.ubuntu.com/mantic/clang-format-17.

(execution 9021517668 / attempt 1)

@Disservin Disservin closed this May 9, 2024
@Disservin
Copy link
Member

What is the purpose of this? I see no value in going back to raw c strings.. obviously in a c project you dont have istringstream so you remove it..

@Disservin
Copy link
Member

Disservin commented May 9, 2024

We are not trying to minimize number of includes though. Stockfish is written in C++ so we might as well use C++

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.

None yet

2 participants