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

No more CopyString when Interviews is not used #2483

Merged
merged 17 commits into from
Oct 9, 2023

Conversation

alkino
Copy link
Member

@alkino alkino commented Aug 31, 2023

No description provided.

@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

@azure-pipelines
Copy link

✔️ 5f0eaae -> Azure artifacts URL

@bbpbuildbot

This comment has been minimized.

@alkino alkino force-pushed the cornu/no_more_ivos_string branch from 5f0eaae to 96049c9 Compare October 9, 2023 15:05
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 16 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@azure-pipelines
Copy link

✔️ 7a17083 -> Azure artifacts URL

@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

Merging #2483 (7a17083) into master (5808287) will decrease coverage by 0.01%.
The diff coverage is 33.13%.

@@            Coverage Diff             @@
##           master    #2483      +/-   ##
==========================================
- Coverage   61.49%   61.49%   -0.01%     
==========================================
  Files         624      624              
  Lines      119026   118980      -46     
==========================================
- Hits        73197    73162      -35     
+ Misses      45829    45818      -11     
Files Coverage Δ
src/ivoc/apwindow.cpp 82.01% <ø> (ø)
src/ivoc/apwindow.h 85.71% <ø> (ø)
src/ivoc/graph.h 68.47% <100.00%> (ø)
src/ivoc/objcmd.h 100.00% <ø> (ø)
src/ivoc/ocfile.h 63.63% <100.00%> (ø)
src/ivoc/ocpointer.cpp 96.80% <100.00%> (-0.04%) ⬇️
src/ivoc/xmenu.h 63.63% <ø> (ø)
src/ivos/OS/string.h 100.00% <ø> (ø)
src/nrncvode/netcvode.cpp 88.38% <100.00%> (+<0.01%) ⬆️
src/nrniv/kschan.h 62.02% <100.00%> (ø)
... and 15 more

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@alkino alkino marked this pull request as ready for review October 9, 2023 17:21
@alkino alkino changed the title No more CopyString No more CopyString when Interviews is not used Oct 9, 2023
Copy link
Member

@pramodk pramodk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

The change seems straightforward. But with all the string manipulation/code generation in string form, possibility to miss something, and hence it would have been nice to have some existing tests for this. @nrnhines : something to consider?

Anyway, I will merge this. Adding tests could be a separate, standalone task.

o << buf << std::endl;
Sprintf(buf, "save_window_.save_name(\"%s\")", var_name_->string());
o << buf << std::endl;
o << "save_window_.save_name(\"" << var_name_ << "\")" << std::endl;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a comment: these are straightforward but having test somewhere about this would have been nice!

char* s = (char*)(string());
delete [] s;
}

/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question: haven't read the usage of this but do you know/understand "why" was this implemented in first place if the code was C++ ? 🤔

Copy link
Member Author

@alkino alkino Oct 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC it has been moved to C++ later. Interviews was added to fulfill what was not yet in the C/C++-standard: strings and basic things like that.

@pramodk pramodk merged commit 846634f into master Oct 9, 2023
35 checks passed
@pramodk pramodk deleted the cornu/no_more_ivos_string branch October 9, 2023 20:25
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.

3 participants