www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How to simplify nested ifs

Hi

I have a construction like the following

if (source) {
   if (source.pool) {
     if (source.pool.repository) {
       if (source.pool.repository.directory) {
	if (source.pool.repository.directory.users) {
	return source.pool.repository.directory.users[ownerID];
						}
					}
				}
			}
		}
Mar 13 2018