Обновление атрибутов функций
This commit is contained in:
		
							parent
							
								
									f749e6686d
								
							
						
					
					
						commit
						52729973a2
					
				
					 4 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
					@ -131,7 +131,7 @@ public:
 | 
				
			||||||
		return idSnapshot;
 | 
							return idSnapshot;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	Snapshot[] getSnapshots(string label = "")
 | 
						Snapshot[] getSnapshots(string label = string.init)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		return _db.getSnapshots(label);
 | 
							return _db.getSnapshots(label);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -178,7 +178,7 @@ public:
 | 
				
			||||||
		ok = true;
 | 
							ok = true;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	string getVersion() {
 | 
						string getVersion() const @safe nothrow {
 | 
				
			||||||
		import cdcdb.version_;
 | 
							import cdcdb.version_;
 | 
				
			||||||
		return cdcdbVersion;
 | 
							return cdcdbVersion;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,7 +13,7 @@ private:
 | 
				
			||||||
	// _gear
 | 
						// _gear
 | 
				
			||||||
	mixin(import("gear.d"));
 | 
						mixin(import("gear.d"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	size_t cut(const(ubyte)[] src) @safe nothrow
 | 
						size_t cut(const(ubyte)[] src) pure nothrow @safe @nogc
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		size_t size = src.length;
 | 
							size_t size = src.length;
 | 
				
			||||||
		if (size == 0)
 | 
							if (size == 0)
 | 
				
			||||||
| 
						 | 
					@ -67,7 +67,7 @@ public:
 | 
				
			||||||
		_maskL = maskL;
 | 
							_maskL = maskL;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	Chunk[] split(const(ubyte)[] data) @safe
 | 
						Chunk[] split(const(ubyte)[] data) @safe nothrow
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		Chunk[] chunks;
 | 
							Chunk[] chunks;
 | 
				
			||||||
		if (data.length == 0)
 | 
							if (data.length == 0)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,5 +6,5 @@ struct Chunk
 | 
				
			||||||
	size_t index; // 1..N
 | 
						size_t index; // 1..N
 | 
				
			||||||
	size_t offset; // смещение в исходном буфере
 | 
						size_t offset; // смещение в исходном буфере
 | 
				
			||||||
	size_t size; // размер чанка
 | 
						size_t size; // размер чанка
 | 
				
			||||||
	ubyte[32] sha256; // hex(SHA-256) содержимого
 | 
						immutable(ubyte)[32] sha256; // hex(SHA-256) содержимого
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,7 @@ import std.file : read;
 | 
				
			||||||
void main()
 | 
					void main()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	auto cas = new CAS("/tmp/base.db", true);
 | 
						auto cas = new CAS("/tmp/base.db", true);
 | 
				
			||||||
	cas.newSnapshot("/tmp/texts", cast(ubyte[]) read("/tmp/text"));
 | 
						cas.newSnapshot("/tmp/text", cast(ubyte[]) read("/tmp/text"));
 | 
				
			||||||
	// import std.stdio : writeln;
 | 
						// import std.stdio : writeln;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	foreach (snapshot; cas.getSnapshots()) {
 | 
						foreach (snapshot; cas.getSnapshots()) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue