Skip to content

The ignore() function in READ_VALUE should be replaced by getline() #2716

Description

@sunliang98

Describe the bug

READ_VALUE function in global_function.h is defined as
template <class T>
static void READ_VALUE(std::ifstream &ifs, T &v)
{
ifs >> v;
ifs.ignore(150, '\n');
return;
}
When the remaining string is longer than 150 charactors, this function will cause various bugs.

Expected behavior

The ignore function should be replaced by getline.

To Reproduce

No response

Environment

No response

Additional Context

No response

Metadata

Metadata

Assignees

Labels

BugsBugs that only solvable with sufficient knowledge of DFT

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions