mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	Use std::stoi instead of atoi(<str>.c_str())
This commit is contained in:
		
							parent
							
								
									e38f40af5b
								
							
						
					
					
						commit
						c11ad24fd7
					
				
					 36 changed files with 109 additions and 109 deletions
				
			
		| 
						 | 
				
			
			@ -268,11 +268,11 @@ struct TestAbcloopPass : public Pass {
 | 
			
		|||
		for (argidx = 1; argidx < GetSize(args); argidx++)
 | 
			
		||||
		{
 | 
			
		||||
			if (args[argidx] == "-n" && argidx+1 < GetSize(args)) {
 | 
			
		||||
				num_iter = atoi(args[++argidx].c_str());
 | 
			
		||||
				num_iter = std::stoi(args[++argidx]);
 | 
			
		||||
				continue;
 | 
			
		||||
			}
 | 
			
		||||
			if (args[argidx] == "-s" && argidx+1 < GetSize(args)) {
 | 
			
		||||
				xorshift32_state = atoi(args[++argidx].c_str());
 | 
			
		||||
				xorshift32_state = std::stoi(args[++argidx]);
 | 
			
		||||
				continue;
 | 
			
		||||
			}
 | 
			
		||||
			break;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -360,11 +360,11 @@ struct TestAutotbBackend : public Backend {
 | 
			
		|||
		for (argidx = 1; argidx < GetSize(args); argidx++)
 | 
			
		||||
		{
 | 
			
		||||
			if (args[argidx] == "-n" && argidx+1 < GetSize(args)) {
 | 
			
		||||
				num_iter = atoi(args[++argidx].c_str());
 | 
			
		||||
				num_iter = std::stoi(args[++argidx]);
 | 
			
		||||
				continue;
 | 
			
		||||
			}
 | 
			
		||||
			if (args[argidx] == "-seed" && argidx+1 < GetSize(args)) {
 | 
			
		||||
				seed = atoi(args[++argidx].c_str());
 | 
			
		||||
				seed = std::stoi(args[++argidx]);
 | 
			
		||||
				continue;
 | 
			
		||||
			}
 | 
			
		||||
			break;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -730,11 +730,11 @@ struct TestCellPass : public Pass {
 | 
			
		|||
		for (argidx = 1; argidx < GetSize(args); argidx++)
 | 
			
		||||
		{
 | 
			
		||||
			if (args[argidx] == "-n" && argidx+1 < GetSize(args)) {
 | 
			
		||||
				num_iter = atoi(args[++argidx].c_str());
 | 
			
		||||
				num_iter = std::stoi(args[++argidx]);
 | 
			
		||||
				continue;
 | 
			
		||||
			}
 | 
			
		||||
			if (args[argidx] == "-s" && argidx+1 < GetSize(args)) {
 | 
			
		||||
				xorshift32_state = atoi(args[++argidx].c_str());
 | 
			
		||||
				xorshift32_state = std::stoi(args[++argidx]);
 | 
			
		||||
				continue;
 | 
			
		||||
			}
 | 
			
		||||
			if (args[argidx] == "-map" && argidx+1 < GetSize(args)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue