Skip to content

Commit 2668652

Browse files
Copilotnunoplopes
andauthored
Fix typo and empty check in converter_lib.cpp (#116)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Nuno Lopes <nuno.lopes@tecnico.ulisboa.pt>
1 parent b8f5f1e commit 2668652

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cpp2rust/converter/converter_lib.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ GetUserDefinedDefaultConstructor(const clang::CXXRecordDecl *decl) {
274274

275275
std::string GetMainFileName(const clang::ASTContext &ctx) {
276276
const auto &src_mgr = ctx.getSourceManager();
277-
auto filed_id = src_mgr.getMainFileID();
278-
auto file_entry = src_mgr.getFileEntryRefForID(filed_id);
277+
auto file_id = src_mgr.getMainFileID();
278+
auto file_entry = src_mgr.getFileEntryRefForID(file_id);
279279
auto file_path = file_entry->getName();
280280
auto file_name = llvm::sys::path::filename(file_path);
281281
return llvm::sys::path::stem(file_name).str();
@@ -399,7 +399,7 @@ std::string GetNamedDeclAsString(const clang::NamedDecl *decl) {
399399
}
400400
}
401401

402-
if (name.size() == 0) {
402+
if (name.empty()) {
403403
name = "self";
404404
}
405405

0 commit comments

Comments
 (0)