Skip to content

Commit 8d18286

Browse files
committed
public interface tidying
1 parent 5e10690 commit 8d18286

File tree

6 files changed

+22
-20
lines changed

6 files changed

+22
-20
lines changed

include/mrdox/Corpus.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ class MRDOX_VISIBLE
6565

6666
/** Return the Info with the matching ID, or nullptr.
6767
*/
68-
/** @{ */
69-
MRDOX_DECL virtual Info* find(SymbolID const& id) noexcept = 0;
70-
MRDOX_DECL virtual Info const* find(SymbolID const& id) const noexcept = 0;
71-
/** @} */
68+
MRDOX_DECL
69+
virtual
70+
Info const*
71+
find(SymbolID const& id) const noexcept = 0;
7272

7373
/** Return true if an Info with the specified symbol ID exists.
7474
*/

source/api/Config.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ loadConfigFile(
160160

161161
// ensure fileName is a regular file
162162
fs::file_status stat;
163-
if(ec = fs::status(fileName, stat))
163+
if((ec = fs::status(fileName, stat)))
164164
return {};
165165
if(stat.type() != fs::file_type::regular_file)
166166
{
@@ -180,7 +180,7 @@ loadConfigFile(
180180
// calculate the working directory
181181
llvm::SmallString<64> workingDir(fileName);
182182
path::remove_filename(workingDir);
183-
if(ec = fs::make_absolute(workingDir))
183+
if((ec = fs::make_absolute(workingDir)))
184184
return {};
185185

186186
// attempt to create the config

source/api/CorpusImpl.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ class CorpusImpl : public Corpus
3333
{
3434
}
3535

36+
Info*
37+
find(
38+
SymbolID const& id) noexcept;
39+
3640
private:
3741
std::shared_ptr<Config const> const&
3842
config() const noexcept override
@@ -46,10 +50,6 @@ class CorpusImpl : public Corpus
4650
return index_;
4751
}
4852

49-
Info*
50-
find(
51-
SymbolID const& id) noexcept override;
52-
5353
Info const*
5454
find(
5555
SymbolID const& id) const noexcept override;

source/api/Support/SafeNames.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class SafeNames::
4242
{
4343
prefix_.reserve(512);
4444
corpus_.visit(globalNamespaceID, *this);
45-
map.try_emplace(llvm::toStringRef(EmptySID), std::string());
45+
/* auto result =*/ map.try_emplace(llvm::toStringRef(EmptySID), std::string());
4646

4747
#ifndef NDEBUG
4848
//for(auto const& N : map)
@@ -59,7 +59,7 @@ class SafeNames::
5959
{
6060
prefix_.reserve(512);
6161
corpus_.visit(globalNamespaceID, *this);
62-
map.try_emplace(llvm::toStringRef(EmptySID), std::string());
62+
/* auto result =*/ map.try_emplace(llvm::toStringRef(EmptySID), std::string());
6363
if(os_)
6464
*os_ << "\n\n";
6565
}
@@ -161,7 +161,7 @@ class SafeNames::
161161
s.append(getSafe(**it0));
162162
if(os_)
163163
*os_ << getSafe(**it0) << "\n";
164-
auto result = map.try_emplace(
164+
/*auto result =*/ map.try_emplace(
165165
llvm::toStringRef((*it0)->id),
166166
std::move(s));
167167
it0 = it;
@@ -179,7 +179,7 @@ class SafeNames::
179179
if(os_)
180180
*os_ << suffix << "\n";
181181
s.append(suffix);
182-
auto result = map.try_emplace(
182+
/*auto result =*/ map.try_emplace(
183183
llvm::toStringRef(it0[i]->id),
184184
std::move(s));
185185
}

source/api/_adoc/AdocSinglePageWriter.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ visit(
195195
if(! visit(*I))
196196
return false;
197197
for(auto const& I : functionOverloads.list)
198-
if(! visit(I))
198+
if(! visitOverloads(I))
199199
return false;
200200
for(auto const& I : typedefList)
201201
if(! visit(*I))
@@ -220,7 +220,7 @@ visit(
220220

221221
bool
222222
AdocSinglePageWriter::
223-
visit(
223+
visitOverloads(
224224
OverloadInfo const& I)
225225
{
226226
// this is the "overload resolution landing page"
@@ -268,6 +268,7 @@ visit(
268268
return true;
269269
}
270270

271+
#if 0
271272
bool
272273
AdocSinglePageWriter::
273274
visitOverloads(
@@ -281,7 +282,7 @@ visitOverloads(
281282
// Location
282283
writeLocation(*I.Functions.front());
283284

284-
// AnyList of overloads
285+
// List of overloads
285286
os_ << '\n';
286287
for(auto const I : I.Functions)
287288
{
@@ -294,7 +295,7 @@ visitOverloads(
294295
os_ << "\n//-\n";
295296
writeBrief(I.Functions.front()->javadoc, true);
296297

297-
// AnyList of descriptions
298+
// List of descriptions
298299
for(auto const I : I.Functions)
299300
{
300301
os_ << ". ";
@@ -308,6 +309,7 @@ visitOverloads(
308309

309310
return true;
310311
}
312+
#endif
311313

312314
} // adoc
313315
} // mrdox

source/api/_adoc/AdocSinglePageWriter.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ class AdocSinglePageWriter
4444

4545
bool visit(NamespaceInfo const&) override;
4646
bool visit(RecordInfo const&) override;
47-
bool visit(OverloadInfo const&);
47+
bool visitOverloads(OverloadInfo const&);
4848
bool visit(FunctionInfo const&) override;
4949
bool visit(TypedefInfo const&) override;
5050
bool visit(EnumInfo const&) override;
5151
bool visit(VariableInfo const&) override;
5252

53-
bool visitOverloads(Info const& P, OverloadInfo const&);
53+
//bool visitOverloads(Info const& P, OverloadInfo const&);
5454
};
5555

5656
} // adoc

0 commit comments

Comments
 (0)