From 24c9ed3645178a6ee2abbd9201fa4643dba068e2 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 14 May 2019 11:35:24 -0400 Subject: review, reduce use of auto --- org/source_files_read.org | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'org/source_files_read.org') diff --git a/org/source_files_read.org b/org/source_files_read.org index a7e5b1c..4a02baa 100644 --- a/org/source_files_read.org +++ b/org/source_files_read.org @@ -52,10 +52,10 @@ static template readConfigSite() { string config_file_str; string conf_filename = "NONE"; auto _conf_file_details = ConfigFilePaths!()(_manifest, _env); - auto possible_config_path_locations = _conf_file_details.possible_config_path_locations.config_local_site; + string[] possible_config_path_locations = _conf_file_details.possible_config_path_locations.config_local_site; foreach(conf_fn; [_conf_file_details.config_filename_site_toml]) { foreach(pth; possible_config_path_locations) { - auto conf_file = asNormalizedPath(chainPath(pth.to!string, conf_fn)).array; + char[] conf_file = asNormalizedPath(chainPath(pth.to!string, conf_fn)).array; conf_filename = conf_fn; if (config_file_str.length > 0) { // conf_filename = conf_fn; @@ -82,7 +82,7 @@ static template readConfigSite() { string filetype() { return conf_filename.extension.chompPrefix("."); } - auto content() { + string content() { return config_file_str; } } @@ -101,7 +101,7 @@ static template readConfigDoc() { string config_file_str; string conf_filename = "NONE"; auto _conf_file_details = ConfigFilePaths!()(_manifest, _env); - auto possible_config_path_locations = _conf_file_details.possible_config_path_locations.sisu_document_make; + string[] possible_config_path_locations = _conf_file_details.possible_config_path_locations.sisu_document_make; foreach(conf_fn; [_conf_file_details.config_filename_document_toml]) { foreach(pth; possible_config_path_locations) { auto conf_file = asNormalizedPath(chainPath(pth.to!string, conf_fn)).array; @@ -151,7 +151,7 @@ static template configReadInSiteTOML() { final string configReadInSiteTOML(M,E)(M manifest, E env) { auto conf_file_details = ConfigFilePaths!()(manifest, env); string conf_toml = conf_file_details.config_filename_site_toml; - auto possible_config_path_locations = conf_file_details.possible_config_path_locations.config_local_site; + string[] possible_config_path_locations = conf_file_details.possible_config_path_locations.config_local_site; string config_file_str; debug(io) { writeln("WARNING (io debug) in config filename: ", conf_toml); @@ -188,7 +188,7 @@ static template configReadInDocTOML() { final string configReadInDocTOML(M,E)(M manifest, E env) { auto conf_file_details = ConfigFilePaths!()(manifest, env); string conf_toml = conf_file_details.config_filename_document_toml; - auto possible_config_path_locations = conf_file_details.possible_config_path_locations.sisu_document_make; + string[] possible_config_path_locations = conf_file_details.possible_config_path_locations.sisu_document_make; string config_file_str; debug(io) { writeln("WARNING (io debug) in config filename: ", conf_toml); @@ -223,7 +223,7 @@ static template configReadInDocTOML() { static template configTOML() { import toml; // <> - auto configTOML(string configuration, string conf_toml_filename) { + TOMLDocument configTOML(string configuration, string conf_toml_filename) { TOMLDocument _toml_conf; try { _toml_conf = parseTOML(configuration); // parseTOML(cast(string)(configuration)); @@ -243,22 +243,22 @@ static template configTOML() { static template configReadSiteTOML() { <> import toml; - final auto configReadSiteTOML(M,E)(M _manifest, E _env) { - auto _configuration = configReadInSiteTOML!()(_manifest, _env); + final TOMLDocument configReadSiteTOML(M,E)(M _manifest, E _env) { + string _configuration = configReadInSiteTOML!()(_manifest, _env); auto _conf_file_details = ConfigFilePaths!()(_manifest, _env); string _conf_toml = _conf_file_details.config_filename_site_toml; - auto _toml_conf = configTOML!()(_configuration, _conf_toml); + TOMLDocument _toml_conf = configTOML!()(_configuration, _conf_toml); return _toml_conf; } } static template configReadDocTOML() { <> import toml; - final auto configReadDocTOML(M,E)(M _manifest, E _env) { - auto _configuration = configReadInDocTOML!()(_manifest, _env); + final TOMLDocument configReadDocTOML(M,E)(M _manifest, E _env) { + string _configuration = configReadInDocTOML!()(_manifest, _env); auto _conf_file_details = ConfigFilePaths!()(_manifest, _env); string _conf_toml = _conf_file_details.config_filename_document_toml; - auto _toml_conf = configTOML!()(_configuration, _conf_toml); + TOMLDocument _toml_conf = configTOML!()(_configuration, _conf_toml); return _toml_conf; } } @@ -283,7 +283,7 @@ static template DocReformRawMarkupContent() { string[] _images=[]; auto _extract_images(S)(S content_block) { string[] images_; - auto _content_block = content_block.to!string; + string _content_block = content_block.to!string; if (auto m = _content_block.matchAll(rgx.image)) { images_ ~= m.captures[1].to!string; } @@ -511,7 +511,7 @@ final char[][] getInsertMarkupSourceContentRawLineArray( #+name: meta_inserts_scan #+BEGIN_SRC d char[][] contents_insert; -auto type1 = flags_type_init; +int[string] type1 = flags_type_init; auto fn_pth_full = fn_src.match(rgx.src_pth_sst_or_ssm); auto markup_src_file_path = fn_pth_full.captures[1]; #+END_SRC @@ -606,7 +606,7 @@ return t; #+name: meta_master_doc_scan_for_insert_filenames #+BEGIN_SRC d char[][] contents; -auto type = flags_type_init; +int[string] type = flags_type_init; auto fn_pth_full = fn_src.match(rgx.src_pth_sst_or_ssm); auto markup_src_file_path = fn_pth_full.captures[1]; char[][] contents_insert; -- cgit v1.2.3