Refactor the code base to use std::string_view
more
#729
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
stim.CompiledDetectorSampler.sample_write
not supportingpathlib.Path
paths"~Hyz"
not being included in exported quirk URLs when the gate was only used in a decompositionstd::string_view
to reduce copiesconst std::string &
andconst char *
now takestd::string_view
, saving a copystd::string
now cast tostd::string_view
, saving a copyconst std::string &
arguments withstd::string_view
argumentsstd::map<std::string, *>
tostd::map<std::string_view, *>
find_enum_argument
GateTarget::from_target_str
togate_target.h
by moving several templated methods likeread_single_target
into that headerstim::print_circuit
from taking a string indent to a counted indentstim::Circuit
andstim::DetectorErrorModel
having implicit conversions from stringsstim::Gate::name
fromconst char *
tostd::string_view
(and changed all the name hashing methods to work on string views)_c_str
annotation to null-terminated string variables in most cases.data()
to.c_str()
when needing a null terminated string in most casesSubCommandHelp::flag_set()